Hi,
Initially I have implemented the Map Scale Tool for distance measuring in my sample application using MapView Interactive Overlay. But while checking with the distance in different zoom levels extent I observed that the distance is displaying in Units of either Kms/Mi or Meters/Feet’s.
- Conversion of km to miles is not correct on the ScaleLine map tool.
- When we try to move the map either left to right or Top to bottom then also distance values are changing. The Expected should not change the values.
- Sometimes when the zoom level move to Level 1 stage at that time Map scale is not able to visible and when we try to change the zoom level as Level 2 then its displaying the Map Scale.
Below is the following sample code for Map Scale. Please have a look at it.
_scaleLine = new ScaleLineAdornmentLayer ()
{
Name = @“scale”,
UnitSystem = ScaleLineUnitSystem.ImperialAndMetric,
Location = AdornmentLocation.LowerRight,
Projection = new Projection(Projection.GetSphericalMercatorProjString()),
XOffsetInPixel = -50f, // Adjust horizontal offset
YOffsetInPixel = -10f, // Adjust vertical offset
};
// _mapView is nothing but the in Xaml ThinkGeo.UI.WPF MapView Name
_mapView.AdornmentOverlay.Layers.Add(_scaleLine);
As per the above code I am facing the wrong Map Scale distance value in the Map.
Zoom Level - 1 it is showing 20kms/20 Mi
Zoom Level: 3 it is showing 500kms/500 Mi
Zoom Level: 4 it is showing 200kms/200 Mi
Miles distance also is not the approximate values
Thanks,
Sana Venkatesh