Select to view content in your preferred language

how to zoom to initial extent?

2308
3
09-13-2012 08:51 AM
DanielSchatt
Regular Contributor
I've added an ESRI image service and I'm using the navigation tool from the "Navigation" sample here. When I click the "Full Extent" on the navigation tool, it zooms out to the entire world (the full extent in the image service) instead of the Extent set in my map element (which is my initial extent).  Does anyone know how I link the "Full Extent" of the nav tool to the Extent set in my map element?  Thanks!

Dan
0 Kudos
3 Replies
JoshuaCorcoran
Emerging Contributor
You could use WebClient to query the Rest service get the inital extent properties and then call Map.ZoomTo and pass in the extent you grabbed from rest.
0 Kudos
DanielSchatt
Regular Contributor
thanks Joshua, problem is I don't know how to access the "Full Extent" event of the navigation tool which is the event that occurs when you click the full extent button within that navigation tool.. there doesn't appear to be any property that corresponds to that.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
0 Kudos