[OpenLayers-Users] WMS layers dynamically re-projected on to
Google Maps base layer--how does this work?
Tim Schaub
noreply at geocartic.com
Fri May 18 13:20:43 EDT 2007
Hey-
Mike Quentel wrote:
> I saw a post concerning how a WMS can be overlayed on Google Maps.
If you haven't figured this one out yet, here's an alternative:
If you can configure your servers or you can find data that is served up
in Mercator, you can overlay any type of layer over Google with the
(still experimental) GoogleMercator layer.
Since Google's data is projected in Mercator, it makes sense to me to
treat it that way. The Google maps API obscures this by transforming to
coordinates to EPSG:4326 (longlat/WGS84). This is handy for people who
think in Lon/Lat, but it confuses things if you assume the imagery is
projected in EPSG:4326.
So, if you let OpenLayers stay in Mercator and transform requests to the
Google layer, you can overlay any layer in the same projection on top of
Google's tiles - this is true for WMS, WFS, tiled, untiled, any vector
data, etc. The one requirement is that your data is served in Mercator
as well.
If you can deal with Mercator, you'll get better performance letting the
servers do the projecting. You also get the ability to cache image
tiles server side.
Just another option to add to your quiver.
See
http://dev.openlayers.org/sandbox/tschaub/google/examples/google-mercator.html
This assumes the following:
# World Mercator
<54004> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0
+ellps=WGS84 +datum=WGS84 +units=m no_defs <>
Tim
More information about the Users
mailing list