Map tooltip template

5 posts, 0 answers
  1. Adam
    Adam avatar
    9 posts
    Member since:
    Jun 2016

    Posted 09 Sep 2016 Link to this post

    I've got the tooltip showing on click, but I cannot access any of the variables from my datasource read method in the template. I either get undefined, or errors when trying different combinations with the template. 


    <script id="Map_Tooltip_Template" type="text/x-kendo-template">

  2. Patrick
    Patrick avatar
    204 posts

    Posted 12 Sep 2016 Link to this post

    Hello Adam,

    The fields that can be used for the template are the location and marker.  In order to set the location like you've described into the template, use the following:

    <script id="Map_Tooltip_Template" type="text/x-kendo-template">

    Here is a Kendo UI Dojo by Progress which illustrates this approach.

    You can find more information on the markers.tooltip.template configuration here in our helpful documentation.

    Hope this helps!

    Telerik by Progress
    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
  3. Max
    Max avatar
    8 posts
    Member since:
    Oct 2017

    Posted 09 Nov 2017 Link to this post

    What if you wanted to return the name of the location not the lat and long?
  4. Eduardo Serra
    Eduardo Serra avatar
    116 posts

    Posted 13 Nov 2017 Link to this post

    Hello Max,

    In the Map tooltip template, we can access the instance (read more about the template here) and the fields available in it are only lat and lng; take a look at them in our API here.

    The names of locations depend on the actual map providers and not Kendo UI, so they're unavailable to the tooltip. If you had a list of names and locations in a DataSource, you could through some customization show tooltips at certain positions: take a look at this sample in the Kendo UI Dojo demonstrating how it could be done.

    I hope this helps!

    Eduardo Serra
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Max
    Max avatar
    8 posts
    Member since:
    Oct 2017

    Posted 21 Nov 2017 in reply to Eduardo Serra Link to this post

    Thank you that was perfect!
Back to Top