Solved! Go to Solution.
var graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; MyMap.ZoomTo(graphicsLayer.FullExtent);
var graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; MyMap.ZoomTo(graphicsLayer.FullExtent);
Hi,
have you tried calling the ZoomTo method of the map with the full extent of the graphics layer?var graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; MyMap.ZoomTo(graphicsLayer.FullExtent);
Cheers,
var e = GraphicsLayer.FullExtent; MyMap.Extent = new Envelope( e.XMin - 4, e.YMin - 1, e.XMax + 4 , e.YMax + 1);