[OpenLayers-Dev] How to display images that span the 180th meridian?

Martijn van Oosterhout kleptog at gmail.com
Sat Dec 1 04:46:58 EST 2007


On Nov 30, 2007 9:51 PM, pdecker <paulad at rmi.net> wrote:
> I want OpenLayers to provide tiles for a bounding box which spans the 180th
> meridian, for examle:  upper left latitude=1.0,  upper left longitude=170.0,
> lower right latitude=-1.0, lower right longitude=-170.0.

OpenLayers doesn't provide tiles, it requests them, soI'll assume
that's what you mean.

> Given this bbox, OpenLayers will then request the following tiles:
> minLon=0.0 maxLon=180.0 minLat= -90.0 maxLat=90.0
> minLon=-180.0 maxLon=0.0 minLat= -90.0 maxLat=90.0
> minLon=-180.0 maxLon=180.0 minLat= -90.0 maxLat=270.0
> minLon=-180.0 maxLon=332.0 minLat= -90.0 maxLat=422.0
>
> The maxLat=270, maxLon=332, maxLat=422 are out of range for valid
> latitude/longitude values.

They're out of the normal range for lat/lon, but other than that
there's no problem. If you look at how informationfreeway works, it
notes when you've gone over the meridian and starts requesting tiles
on the other side. There's actually code built into OpenLayer to
handle this case. No single tile wraps over the meridian, but the
effect looks like it does.

Does this help?

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/



More information about the Dev mailing list