[OpenLayers-Users] WMS overlay alignment on Google Map baselayer
Christopher Schmidt
crschmidt at crschmidt.net
Sun Aug 20 06:23:36 CDT 2006
On Sun, Aug 20, 2006 at 10:44:22AM +0200, Arnd Wippermann wrote:
> Hello,
>
> I would think, OpenLayers does not currently support drawing WMS results
> WRONG on top of Google Maps. With adding the vmap-Layer to google_map.html
> it seems that the arcadia-layer lies on the right position.
Wrong is one way of putting it ;) Differently is another. Google Maps
does use a different kind of projection -- the projection in question
does exist, there's nothing particularly 'wrong' with it, however, their
way of exposing it to the web is not in a way that makes sense in GIS
terms. Essentially, they take the whole world, project it into Mercator,
and then their API does all the math to convert from Lat/Lon to
Mercator, displaying the map correctly.
Google now exposes functionality to convert from their lat/lon to
Mercator projected coordinates in meters. It is possible to use this to
determine the bounding box for where a tile actually is geographically,
and in that sense, drawing the map in the right location. This is what
the custom tiling code which the original poster is using. However,
*this is additional code that OpenLayers does not have*. Again, this is
not an impossibility, but it is something that OpenLayers does not
currently do.
> Am I right, that Google Maps in OpenLayers always differ from the correct
> SRS, because Google use a special projection (to avoid users from simple
> joining their own data with google maps?) and therefor I have to modificate
> my own data to show them with Google as underlieing map.
This is only somewhat correct. Google Maps uses a *different* projection
-- but not a special one. It's just Mercator. However, it's not obvious
from their interface, which is designed for Humans, rather than GIS
professionals.
--
Christopher Schmidt
Web Developer
More information about the Users
mailing list