webskister

wrapAround180 causes screen coords to get out of sync breaking geometry capabilities

Discussion created by webskister on Mar 17, 2011
Latest reply on Mar 24, 2013 by hithredin
When utilizing the map wrapping option (wrapAround180) the screen coordinates for geometries do not get updated correctly when wrapping. They just keep growing from the original point. This causes several of the capabilities to fail. Such as:


  • extent.contains(graphic.geometry)



For example:

I have a world extent with one esri.Graphic made up of an esri.geometry.Point.


  1. I grab the X screen coordinate of my point at startup which is in the center of the screen and I get a value of X=360 (pixel space)

  2. I pan my map to the left (dragging the the map to the left), which wraps around the world, causing the Graphic to disappear on the left and reappear on the right as expected. I center my Graphic on the screen and I grab the X screen coordinate of my point and get a value of X=-163 (pixel space).

  3. I pan again to the left and repeat the process...get a value of X=-647 (pixel space).

All the geographic coordinates seem correct, but if I wanted to use an extent and run the contains method this will only work for the initial view. When I pan the graphic screen locations will never cross paths as they are not in sync with the extent so no results are found.

I imagine this breaks several capabilities.

Anyone know of a near term solution or is the wrapping still considered an "alpha" capability and not ready for prime time.

Outcomes