IDL(International Date Line)

When this (draw a polygon besides IDL on the map) occurs, the points for the polygon on the east side (i.e. USA) are captured with coordinates <-180 (i.e. I got things such as -252.0201... for one of the long coordinates). This in turn throws an exception in ContactServiceImpl because it expects points to be between -180 to 180.

As far as the issue itself, I have not found a solution for it. As a matter of fact, it appears that it may be a known bug that some people are working towards a fix for. Here is an old forum thread about what appears to be the same issue: http://lists.osgeo.org/pipermail/openlayers-dev/2010-August/006360.html (sort by thread to see all 20+ messages regarding this issue). However, I don't see any resolution on the matter.

I also played with the wrapDateLine field (http://dev.openlayers.org/releases/OpenLayers-2.12/doc/devdocs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.wrapDateLine) and it appears to do exactly what it says. When I set it to false on the Google layer, it simply stops allowing the user to pan continuously in the longitudinal (horizontal) direction. It does not do anything in terms of providing polygon points that conform to the -180 to 180 interval.

posted on 2013-03-11 21:53  -Anny-  阅读(247)  评论(0编辑  收藏  举报