This is a migrated thread and some comments may be shown as answers.

Showing tooltips for shapes on mouseover

8 Answers 159 Views
Map
This is a migrated thread and some comments may be shown as answers.
Luiz
Top achievements
Rank 1
Luiz asked on 03 Nov 2014, 07:01 PM
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!

8 Answers, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 04 Nov 2014, 07:18 AM
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.

 
0
Luiz
Top achievements
Rank 1
answered on 04 Nov 2014, 02:59 PM
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".
0
Hristo Germanov
Telerik team
answered on 06 Nov 2014, 08:42 AM
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.

 
0
Luiz
Top achievements
Rank 1
answered on 06 Nov 2014, 02:31 PM
Oh, ok. I'll try this out, thanks!
0
Justine
Top achievements
Rank 1
answered on 29 Jul 2015, 07:14 PM
Were you able to get this working? 
0
T. Tsonev
Telerik team
answered on 31 Jul 2015, 12:14 PM
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
0
Justine
Top achievements
Rank 1
answered on 31 Jul 2015, 04:35 PM

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

 

0
T. Tsonev
Telerik team
answered on 04 Aug 2015, 02:35 PM
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
Tags
Map
Asked by
Luiz
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Luiz
Top achievements
Rank 1
Justine
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or