Hello Piero,<br><br>You may have to adjust the coordinates to 'saddle' the IDL. For example, a rectangle with the coordinates:<br><br><span style="font-family: courier new,monospace;">170, 10 -------+------ -170, 10</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> | | |</span><br>
<span style="font-family: courier new,monospace;"> | | |</span><br>
<span style="font-family: courier new,monospace;"> | IDL |</span><br>
<span style="font-family: courier new,monospace;"> | | |</span><br>
<span style="font-family: courier new,monospace;"> | | |</span><br>
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> | | |</span><br><span style="font-family: courier new,monospace;">170, -10 ------+------ -170, -10</span><br>
<br>May extend the "wrong way" around the globe. If you manually adjust the coordinates so they are all on the same side of the IDL, it will probably work:<br><br><span style="font-family: courier new,monospace;">-190, 10 -------------- -170, 10</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;">-190, -10 ------------- -170, -10</span><br><br>or:<br><br><span style="font-family: courier new,monospace;">170, 10 -------------- 190, 10</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> | |</span><br>
<span style="font-family: courier new,monospace;">170, -10 ------------- 190, -10</span><br><br>Notice that in the last two examples, the X coordinates are either all positive, or all negative. I have found this to work quite well; you can even extend this to keep adding features to 'globes' that are beyond -180. There is one thing to be wary of, though: when you do cross the date line, the entire geometry will jump to the left or right by 1 globe circumference. I don't have a workaround for that, but you can trick OL by adding features to the neighboring 'globes'.<br>
<br>-z<br>
<br>On Tue, Jul 27, 2010 at 7:03 AM, Piero Campa <<a href="mailto:piero.campa@gmail.com">piero.campa@gmail.com</a>> wrote:<br>><br>> Hi all,<br>> I'm drawing polygon over a Google base layer.<br>><br>
> Even though I set wrapDateLine to true in the Google base layer, the Vector<br>> layer AND the temporary layer created by the RegularPolygon handler, still<br>> when I draw a polygon I cannot cross the IDL.<br>
><br>> Any idea guys?<br>> Thank you,<br>> Piero<br>><br>> --<br>> View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/International-date-line-and-bounds-tp2541265p5341698.html">http://osgeo-org.1803224.n2.nabble.com/International-date-line-and-bounds-tp2541265p5341698.html</a><br>
> Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>> _______________________________________________<br>> Users mailing list<br>> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br><br><br><br>--<br><br>David Zwarg<br>Software Developer at Azavea (formerly Avencia)<br><br>(215) 701-7718<br>
<a href="mailto:dzwarg@azavea.com">dzwarg@azavea.com</a><br><a href="http://www.azavea.com/">http://www.azavea.com/</a><br>