Hello,
There's no built in scale control, but the Map provides with the basic info via the
extent() method and the
Location class.
For example, we can calculate 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);
We use the midline, as distance can vary wildly because of the curvature of the earth.
See
Understanding Scale and Resolution on (MSDN).
From there the map scale (m/px) is:
var width = map.element.width();
var scale = Math.round(distance / width);
I've prepared
a snippet that demonstrates how this can be displayed on the map.
Please, file a request for a built-in map scale on our
UserVoice portal if you have minute.
This will help us gauge the overall interest and prioritize.
I hope this helps.
Regards,
T. Tsonev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework -
download Kendo UI now!