Showing tooltips for shapes on mouseover

9 posts, 0 answers
  1. Henrique
    Henrique avatar
    5 posts
    Member since:
    Sep 2014

    Posted 03 Nov 2014 Link to this post

    Hey, 

    I'm displaying a map using GeoJson data and would like to display a tooltip when the user moves the mouse over a shape, is this possible?
    I'm using the asp.net MVC wrapper and only managed to show tooltips for markers, not shapes.

    Thanks!
  2. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 04 Nov 2014 Link to this post

    Hi Henrique,

    We have not build in MVC configuration for shape's tooltip. But you can try to hook up to the map's shapeMouseEnter event and add a tooltip with the desired output? In shapeMouseLeave you need to hide it.

    I hope this helps.

    Regards,
    Hristo Germanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Henrique
    Henrique avatar
    5 posts
    Member since:
    Sep 2014

    Posted 04 Nov 2014 in reply to Hristo Germanov Link to this post

    Thanks for answering, I still have a doubt, tho.
    In what shape property should I hook the tooltip? If I try to add it to the "e.shape", I get an error because it has no "width".
  5. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 06 Nov 2014 Link to this post

    Hello Henrique,

    In this event you have:
    e.originalEvent Object
     
    The source jQuery event instance
    and you can access the element via e.originalEvent.target.

    Regards,
    Hristo Germanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Henrique
    Henrique avatar
    5 posts
    Member since:
    Sep 2014

    Posted 06 Nov 2014 in reply to Hristo Germanov Link to this post

    Oh, ok. I'll try this out, thanks!
  7. Justine
    Justine avatar
    2 posts
    Member since:
    May 2014

    Posted 29 Jul 2015 in reply to Henrique Link to this post

    Were you able to get this working? 
  8. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 31 Jul 2015 Link to this post

    Hi,

    There's no built-in support for tooltips, but I've got a snippet that demonstrates how this can be done for now.

    I hope this helps.

    Regards,
    T. Tsonev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  9. Justine
    Justine avatar
    2 posts
    Member since:
    May 2014

    Posted 31 Jul 2015 in reply to T. Tsonev Link to this post

    Thank you very much, this was extremely helpful! You guys do such a great job supporting us developers with these forums!

    I was able to get a tooltip to show properly when I entered each shape on my US map (I am working with ASP MVC). 

    I was wondering if you had any advice as to showing a legend for a map. I created a tooltip for the map itself with the legend  information but I would like something in the map itself. Is this possible? 

    Thanks,

    Justine

     

  10. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 04 Aug 2015 Link to this post

    Hi,

    The Map doesn't currently offer a built-in legend. I imagine a legend should be a color scale in this scale, right?

    Please, file a request for this feature on our UserVoice portal if you have minute.
    This will help us gauge the overall interest and prioritize.

    Regards,
    T. Tsonev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready