In the Kendo/ASP.Net Map add the option for a legend with distance scale that updates on zoom level. See attached image for placement and function
Hi guys,
the Map provides with the basic info via the extent() method and the Location class.
The requested functionality can be achieved by calculating the total distance (in m) visible across the map mid-line:
var extent = map.extent();
var center = map.center();
var eastCenter = new Location(center.lat, extent.nw.lng);
var westCenter = new Location(center.lat, extent.se.lng);
var distance = eastCenter.distanceTo(westCenter);
From there the map scale (m/px) is:
var width = map.element.width();
var scale = Math.round(distance / width);
You can see a runnable sample demonstrating this approach here:
http://dojo.telerik.com/@tsvetomir/ubiqO/
Regards,
Vessy
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/.
Concur. This exists in the Silverlight control.