Is it possible to zoomToEnvelope in a webmap?

3250
1
09-24-2014 01:49 PM
TylerWarhurst
New Contributor

I am working on an app that displays a map. I have the code opening the webMap I have created on ArcGIS.com.

In the method

-(void)webMapDidLoad:(AGSWebMap *)webMap

I set an envelope and then call

[self.mapView zoomToEnvelope:env animated:YES];

But the map just zooms to its normal extent, rather than the one I specified. I cant quite figure out what I am doing wrong. Any help would be appreciated.

0 Kudos
1 Reply
TomBruns
Esri Contributor

Try waiting until

- (void)didOpenWebMap:(AGSWebMap *)webMap intoMapView:(AGSMapView *)mapView

Somewhere between webMapDidLoad: and didOpenWebMap:intoMapView the SDK may be setting the envelope.

0 Kudos