AGSMapView replacement for maxEnvelope in version 100.0

1076
2
Jump to solution
11-30-2016 06:09 AM
AbdelrahmanBadary
New Contributor II

Hello all,

When i used the 10.2.5 version of the ArcGIS framework, i could write the following code to limit the maximum zoom out of the map view :

localMapView.maxEnvelope = [AGSEnvelope envelopeWithXmin:XMIN ymin:YMIN xmax:XMAX ymax:YMAX spatialReference:localMapView.spatialReference] ;

i wonder what is the replacement of the maxEnvelope property on the 100.0 version, and how it can be used?
i noticed there is a "
visibleArea" property but it is readonly, so any help would be appreciated .  



Thank you! 

0 Kudos
1 Solution

Accepted Solutions
DiveshGoyal
Esri Regular Contributor

There isn't a direct replacement at this time unfortunately. We hope to have something similar in a future release.

In the meantime, you could set a min/max scale on the map to prevent the mapview from zooming in or out too far, but this won't limit the area the user could pan to.  You could try listening to changes to the mapview's viewpoint or visibleArea, and then reset the viewpoint back to your maxEnevelope if the user pans out of it, but it may not provide the best U/X

View solution in original post

2 Replies
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Abdelrahman,


Maybe you can try to disable the mapView zoom when the mapview scale level change to a certain level as a workaround.

ArcGIS Runtime SDK for iOS: AGSMapViewInteractionOptions Class Reference 

DiveshGoyal
Esri Regular Contributor

There isn't a direct replacement at this time unfortunately. We hope to have something similar in a future release.

In the meantime, you could set a min/max scale on the map to prevent the mapview from zooming in or out too far, but this won't limit the area the user could pan to.  You could try listening to changes to the mapview's viewpoint or visibleArea, and then reset the viewpoint back to your maxEnevelope if the user pans out of it, but it may not provide the best U/X