Is there any event in map which will fire after loading the map so that I can run the code at that time?
MyMap.ZoomTo ( pt);If you don't want to Zoom too close, you can do something like the following: Envelope env = new Envelope(); env.SpatialReference = MyMap.SpatialReference; env.XMax = pt.X + 500; env.YMax = pt.Y + 500; env.XMin = pt.X - 500; env.YMin = pt.Y - 500; MyMap.ZoomTo(env);
If you want to set the extent prior to the map is ready for zooming, just set the extent instead of zooming.ie. myMap.Extent = myNewExtent;
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.