I've been integrating a Google Map layer into Community Mapbuilder - a web mapping client so that we can display Web Map Server (WMS) layers over a GoogleMap base.
However, we have run into problems with Spacial Reference Systems (or projection). A projection is a way to describe a spherical world on a flat piece of paper.
The WMS specification (as defined by the Open Geospacial Consortium) defines thousands of different Spacial Reference Systems using EPSG codes. For example, simple (lat,long) uses EPSG:4326. And a WMS request looks something like:
Unfortunately, the Mercator projection & datum used by Google Maps does not have a corresponding EPSG code.
Consequently, as far as I can work out, it is not possible to use a standard way to request a WMS map which is in the same projection as Google Maps.
Existing WMS/Google Map mashups I've seen on the web so far use EPSG:4326. This projection is reasonably close if you zoom into a city, but is out by miles if you look at a map of the world. (See images).
- Google, the OGC, and the owners of EPSG codes should get together and define a new EPSG code so these two types of maps can be incorporated together.
- I'm guessing option 1 will take a while. So in the mean time, WMS servers and WMS clients (like Mapbuilder) should define our own EPSG code to use in the interum. Maybe EPSG:Mercator?
I'm a programmer, not a geographer, so I'm likely to have some of the geographic terms incorrect.
Update 30 Sept 2006
John Deck has blogged describing a work around to rendering WMS on Google Maps at http://johndeck.blogspot.com/2005/09/overlaying-mercator-projected-wms.html and then an update at http://johndeck.blogspot.com/2006_02_01_johndeck_archive.html.
Open Layers have incorporated a hack into their codebase which includes stretching the WMS layer to fit. This will still have distortion issues as the projection of the WMS and Google Map use different projections.
The best solution would still be if a new EPSG code were created for GoogleMap layers.