Select to view content in your preferred language

zoom factor on map with buffer geometry

939
1
06-23-2014 06:15 AM
BhavinSanghani
Frequent Contributor
I am trying to implement similar functionality in my project as per the following url. This example shows the circle with radius of 1 mile when you click on the map. Now, if you change the radius to 10 miles then circle won't be visible on the screen. You will have to zoom-out to see that. Also, features disappear when you zoom-out. How to render map such a way so, circle and selected features are in full visibility on the screen with appropriate zoom factor? Then user won't need to manually perform zoom-in/zoom-out to see the result of buffer search.

https://developers.arcgis.com/javascript/jssamples/query_buffer.html
0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor
Hi Bhavin,

This is a two part answer.

First, you would need to center and zoom the map using something like centerAndZoom(mapPoint,levelOrFactor). You could set the center point based on the user's click on the map, and hardcode the zoom level to be appropriate.

Second, you need to make sure your features are published to display at the appropriate zoom level.

Hope this helps!

-Noah
0 Kudos