Select to view content in your preferred language

Zoom to the maximum extent

750
4
11-02-2011 09:56 PM
SamLaker
Emerging Contributor
I am using ArcGIS 9.3. When I perform a search and draw the returned features on the map, I need it to be zoomed to the maximum possible extent that includes all features. Is this possible? Any examples appreciated.
0 Kudos
4 Replies
HemingZhu
Frequent Contributor
I am using ArcGIS 9.3. When I perform a search and draw the returned features on the map, I need it to be zoomed to the maximum possible extent that includes all features. Is this possible? Any examples appreciated.


map.extent =esri.graphicsExtent(featureSet.features).
0 Kudos
SamLaker
Emerging Contributor
Thanks, but in my case, I have multiple layers. This way I can only change the extent of the base layer. But my features are on another layer. (Both served in one map service though). How can I handle this scenario?
0 Kudos
HemingZhu
Frequent Contributor
Thanks, but in my case, I have multiple layers. This way I can only change the extent of the base layer. But my features are on another layer. (Both served in one map service though). How can I handle this scenario?


Extent.union(extent).
0 Kudos
SamLaker
Emerging Contributor
Thanks for your response.
I found the exact solution I was looking for here.
http://forums.esri.com/Thread.asp?c=158&f=2396&t=267827
0 Kudos