Difficulty zooming to fit envelope across dateline

313
2
Jump to solution
10-03-2012 04:54 AM
LeeJohnson
New Contributor
Hi,

I am having difficulty zooming the mapview to fit an envelope or geometry that spans the dateline (I have wrap around switched on). It seems that whenever I query the envelope it has been "normalized" and no longer contains values outside the boundaries of the map, even though I'm positive I put them in correctly. The basic steps I am going through are:

1. Calculate min and max lat/lon values for my envelope, some will be outside the map boundaries signifying polylines that span the dateline.
2. Project the envelope into web mercator spatial reference
3. Call zoomToEnvelope:animated:

Is this supposed to work?
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
If you provide an envelope which is outside of date line to zoomToEnvelope then it will zoom to it but if you perform any operation like project or get envelope from query result it's going to be normalized one.

Hope this helps!

Regards,
Nimesh

View solution in original post

0 Kudos
2 Replies
NimeshJarecha
Esri Regular Contributor
If you provide an envelope which is outside of date line to zoomToEnvelope then it will zoom to it but if you perform any operation like project or get envelope from query result it's going to be normalized one.

Hope this helps!

Regards,
Nimesh

View solution in original post

0 Kudos
LeeJohnson
New Contributor
OK, thanks.
0 Kudos