How to show marker multiple times on a recursive map?
1 Answer 14 Views
Map
Ben
Top achievements
Rank 1
Ben asked on 15 Jun 2021, 11:28 AM

Hi,

When the map is zoom out to world map, continents are duplicated on screen (attached).  However the marker only display ones and does not replicate itself on the map. 

Is there a way to display the marker on duplicated continents?  Thanks!

Here's the code that I have:

$("#map").kendoMap({
      zoom: 1,
      layers: [{
        type: "tile",
        urlTemplate: "http://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
        subdomains: ["a", "b", "c"],
        attribution: "© <a href='http://osm.org/copyright'>OpenStreetMap contributors</a>"
      }]
    });

    var map = $("#map").data("kendoMap");
    map.markers.add([{ location: [33.7580, -118.2762]}]);

 

       

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 18 Jun 2021, 07:19 AM

Hi Ben,

The markers render on a second layer and they do not know that the Map rerenders several times recursively on a zoom out. It is recommended to restrict the zoom out for the user:

Here is an example Dojo demo demonstrating this:

Let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Map
Asked by
Ben
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or