[OpenLayers-Users] Map wrapping?

Christopher Schmidt crschmidt at metacarta.com
Sat Mar 8 15:26:08 EST 2008


On Sat, Mar 08, 2008 at 02:40:02PM -0500, Ken Stuart wrote:
> Hi - OpenLayers looks like a very nice mapping solution for us, if it
> wraps maps, which seems uncertain. Does OpenLayers offer this
> functionality when maps are panned or clicked-and-dragged?
> 
> The map on the OpenLayers home page - for example - does not fill in
> when it is shifted to the right. That is, when it shifts, white space
> appears on the left on the west when the map is shifted to the east.
> The map container does not fill in with the part of the map that is
> shifted out the other direction.
> 
> We need the map to stay in the same space, and wrap around to fill in
> this white space as it gets moved. Can this be done? I've been looking
> through examples and tutorials etc. but have not found any that show
> this capability. Google maps behaves this way so I hope OpenLayers
> does too.
> 
> The primary need for this is a map centered on the Pacific Ocean area;
> all the example maps seem to use the default centered on Europe, thus
> causing problems for map boundaries through the area of interest in
> our situation.

1. If you need to wrap the date line, you're probably using the wrong
projection.

2. There is some limited support in OpenLayers for wrapping the display
of tiles across the dateline.
http://openlayers.org/dev/examples/wrapDateLine.html

3. This support is limited if you want to do things other than display
tiles. For example, drawing vectors across the dateline raises issues. A
more specific description of what you want to do might help: if it's
just about displaying map tiles, you're probably in reasonably okay
shape so long as you have a sane number of layers. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list