Solved! Go to Solution.
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);
Is there any event in map which will fire after loading the map so that I can run the code at that time?
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;