Select to view content in your preferred language

Confusion around Extent min/max values

652
1
Jump to solution
01-04-2018 10:58 AM
yangwen
Regular Contributor

When I instantiate an extent, I provide the min/max coordinates to the Extent constructor as such

{xMin: -104.6279632, xMax: -103.2536728, yMin: 32.1424875714, yMax: 32.96790257160003}

However when I view the Extent obj instance, the min/max values are now magnitudes larger than the values I've passed:

  1. xmax:-11460263.863552293
  2. xmin:-11681014.001239965
  3. ymax:3885914.941853233
  4. ymin:3787158.301308748

How does the input min/max coordinates related to the min/max coordinates on the Extent instance?

I'm trying to cache the Extent after view becomes stationary.  As such, I'm caching the larger min/max pairs from the extent object.  This value can not be subsequently used to re-instantiate an Extent via the constructor method.

Is there some translation algorithm to map between the input min/max and the instantiated min/max?    Thanks

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Yang,

   The difference between the values is WGS84 (what you are using) and Web Mercator (which is being returned from the extent). Your map is in Web Mercator so the WGS84 value you are providing are being projected to Web Mercator.

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Yang,

   The difference between the values is WGS84 (what you are using) and Web Mercator (which is being returned from the extent). Your map is in Web Mercator so the WGS84 value you are providing are being projected to Web Mercator.