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

Marker Tooltip Show on Load

3 Answers 58 Views
Map
This is a migrated thread and some comments may be shown as answers.
RBarnes
Top achievements
Rank 1
RBarnes asked on 12 Dec 2014, 03:51 PM
I'm adding my markers and tooltip in code behind, is there an easy way to get the tooltip to be opened when the page loads?

ShowOnPageLoad="True" for example

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 15 Dec 2014, 03:38 PM
Hello Roger,

Could you please provide more details? I am not sure, but from the description provided it seems that there is only one marker added? Is that correct?

If the native marker's tooltip is used, you should be able to dynamically open the popup element using the RadMap's client-side API. The tooltip is actually a Kendo tooltip and you can use its show() method to show it.

If you have difficulties on the implementation, please provide more details how the marker is added, and what is the exact scenario, so that I could assist you properly.

Regards,
Ianko
Telerik
0
RBarnes
Top achievements
Rank 1
answered on 17 Dec 2014, 09:02 PM
Yes, in this case there is a single marker added with a tooltip, bound via codebehind and I want the tooltip to be shown when the page loads.
0
RBarnes
Top achievements
Rank 1
answered on 18 Dec 2014, 02:30 PM

Got it working like I want

<ClientEvents OnLoad="map_load"/>

 

function map_load(sender, args) {
               map = sender.get_kendoWidget();
               //If we have items, we'll show our item tooltip
               if (map.markers.items.length > 0) {
                   map.markers.items[0].tooltip.show();                   
               }
           }
Tags
Map
Asked by
RBarnes
Top achievements
Rank 1
Answers by
Ianko
Telerik team
RBarnes
Top achievements
Rank 1
Share this question
or