yuvd3

Map.ZoomTo using graphic geometries

Discussion created by yuvd3 on Nov 7, 2011
Latest reply on Nov 18, 2011 by buddha198
I am using the following maps from the available arcgis servers

base layer:
http://services.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer

state boundaries layer:
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5

layer used for city information:
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0

I can easily be anywhere on the map and call Zoom.To and provide any graphic's extent from the state layer and the map will show as expected. However when attempting to do the same thing with any of the city layer's graphics, the function fails to do anything at all.

What might the reason for this be?

In an attempt to narrow down possibilities, I have tried using Map.PanTo and provide the same geometry information, this function works and behaves as expected. (except it only pans, I would also like to zoom to the minimum resolution, however I have tried map.zoomToResolution while providing map points.)

In the end what I would like to do is provide functionality for zooming in on a clicked location. I am currently providing the geometry information through an event handler to the map and calling the methods there with the provided args.

Any direction would be helpful.

Thanks.

Outcomes