[OpenLayers-Users] Mapping the globe with OpenLayers

Ryan Hofschneider ryan.hofschneider at gmail.com
Mon Jul 21 19:50:25 EDT 2008


On Jul 21, 2008, at 3:18 PM, Paul Spencer wrote:

> You should be able to set the wrapDateLine property - see the
> wrapDateLine.html example.
>
> On 21-Jul-08, at 3:52 PM, Jani Patokallio wrote:
>
>> 1) The maps I've tried so far (OpenCarta and OpenStreetMap) don't
>> "wrap", so if I scroll west of Alaska or east of Japan, I get blank
>> space instead of the other side of the world.  Is there any way to
>> make
>> this happen?

That will work for a 'Layer.WMS' or a 'Layer.MapServer' layer, but for  
your vector layer you'll have to cobble-up something on your own...

I recommend splitting at the 180 boundary, as you mention, and draw  
multiple representations of each line segment (shifted 0, -360, +360  
degrees longitude) to make sure that as the user is panning to the  
left or right the track doesn't disappear.

Cheers,
Ryan 



More information about the Users mailing list