Hi. I'm using virtualization layer and I want add pushpins into may use map scale and distance in pixel between 2 points.
For example I have gps track with 1000 points. and I Have map zoomlevel 10
I need to show pushpin on pan which have 20 pix distance between 2 pushpin
var cPixl = eventArgs.Layer.MapControl.SpatialReference.GeographicToLogical(currentPoint);
var nPixel = eventArgs.Layer.MapControl.SpatialReference.GeographicToLogical(nextPoint);
var aPix = eventArgs.Layer.MapControl.SpatialReference.GeographicToLogical(lastAdded);
var pixDist = Math.Sqrt(Math.Pow(nPixel.X - cPixl.X, 2) + Math.Pow(nPixel.Y - cPixl.Y, 2));
var lastDist = Math.Sqrt(Math.Pow(nPixel.X - aPix.X, 2) + Math.Pow(nPixel.Y - aPix.Y, 2));
use this code I can convert gps point to pixel and get distance between 2 coordinate in pixel.
Now I need to check lastDist with some constant variable for current zoom, and if this distance >= that this var I must add pushpin.
But I don't know how can I calculate this variable for different zoom level.
for example for zoom level I want that distance between 2 markers will be 20px, but eventArgs.Layer.MapControl.SpatialReference.GeographicToLogical return value between 0 and 1this mean that calculated distance will be between 0 and 1 too.