[OpenLayers-Users] Users Digest, Vol 4, Issue 22

Christopher Schmidt crschmidt at crschmidt.net
Tue Aug 29 08:15:16 CDT 2006


On Tue, Aug 29, 2006 at 11:19:34AM +0200, "RIVIERE Robert - CETE Méditerr./DI/ETER" wrote:
> Hello,
> 
> it's the first time I'm  posting to this mailist but I've been following
> discussions for several months.
> I'm working for a big administration where we've built in last months an
> infrastructure of WMS servers.
> OpenLayers seems to be quite interesting to use as a WMS client,
> congratulations for this very nice work.
> 
> But when trying to use it, I've found the same problems that have been
> discussed earlier this month :
> 
> - on the fly reprojection : if my server's original data are not it
> EPSG:4326, requested tiles are generated after a reprojection by the server.
> But as Arnd Wippermann mentionned, "A square in one projection is not a
> square in the other projection", so data present in a square tile are not
> coming from a square initial region. The result is that when you are gluing
> tiles together, they dont match on borders, pieces of territories are
> repeated on several tiles, etc...

Hm, this shouldn't be happening. Tiles are always geographically aligned 
-- Mapserver's reprojection should ensure that the data always lines up,
even if the tiles don't always look exactly the way they should.

Note, however, that you can also tell OpenLayers to act in a different
projection:

  new OpenLayers.Map('map', 
        {'projection': 'EPSG:265', 
         'maxExtent': new OpenLayers.Bounds(0,0,10000,10000),
         'maxResolution': 'auto',
         'units': 'm'
        }); 

This will modify the WMS requests to match your base projection. Note
that your maxExtent Bounds should match those of the data you wish to
display, and the 'units' must match your data as well. 

If you need more assistance with setting this up, please feel free to
provide an example WMS URL, and some sample code which is not working
for you.

Regards,
-- 
Christopher Schmidt
Web Developer


More information about the Users mailing list