I’m trying to display a PointShape (PointSymbolType.Circle) at a specified Lat/Lon. This works fine, but what I want is to NOT have the circle shrink as I zoom in. I want the radius to stay constant (n meters from center). How can I accomplish this?
PointShape Zooming
Hi Ryan,
We can define a custom point style to achieve this:
publicclassCustomPointStyle : PointStyle{publicCustomPointStyle (PointSymbolType symbolType, GeoSolidBrush symbolSolidBrush, GeoPen symbolPen,intsymbolSize):base(symbolType, symbolSolidBrush, symbolPen, symbolSize){}protectedoverridevoidDrawCore(IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers){Collection<ZoomLevel> zoomLevels = (newZoomLevelSet()).GetZoomLevels();intzoomLevelNumber = 0;for(inti = 1; i <= zoomLevels.Count; i++){if(zoomLevels<i>.Scale == canvas.CurrentScale){zoomLevelNumber = i;break;}}this.SymbolSize = this.SymboSize* zoomLevelNumber;base.DrawCore(features, canvas, labelsInThisLayer, labelsInAllLayers);}}
Hope it works for you.
Regards,
Troy