MapView Zoom-in Problem

430
1
02-24-2012 09:11 AM
KavithaSampath_kumar
New Contributor
I implemented Mapview and added two layers. Everything is working fine without any issues.
But I want control Zoom-in level. Zoom-in should not go beyond certain level ( not to very detail level).  
Is this control associated with resolution or OnZoomListener ?
0 Kudos
1 Reply
AndyGup
Esri Regular Contributor
@skaviksk the general coding pattern goes something like this:

1) Listen for map extent change via onZoomListener()
2) after the zoom event completes, get the current scale via MapView.getScale()
3) compare current scale against your pre-defined minimum scale value
4) If zoom level is below your minimum then bounce the map back up to the minimum using zoomToScale()

-Andy
0 Kudos