I'm writing a program using ArcGIS Engine, and need to zoom & pan into the map to show the selected content.
Loading and displaying the map does work using something like this:
AxMapControl _mapControl;
// in constructor:
_mapControl = new AxMapControl();
// in loading
_mapControl.LoadMxFile(@"C:\Users\me\Documents\TestProject.mxd");
Afterwards I select some objects and want to zoom into them, but I can't find a way to get the selected extent – any pointers to achieve this?
Best Answer
suppose you have just one Layer, with the selected features & you want to zoom to the extent of all the selected features, here is how I would do it: