[OpenLayers-Users] WMS layers dynamically re-projected on to Google Maps base layer--how does this work?

Mike Quentel mikequentel at yahoo.com
Fri May 18 13:48:20 EDT 2007


Tim,

Thank you for the suggestions.

Some of the external WMS that my application attempts to pull in are in WGS84.  I see the suggestion of storing our data in Mercator.  Not sure if this would work for our architecture, though I see what you are saying about the possibility of improving performance with Google.

What I was hoping to understand is: how is Google Maps stretching the overlays?  Also, I'm hoping to find what Google class and method controls this.  Anyone that can explain this to me, I'd greatly appreciate it.  Sorry if this is something very obvious, but I don't understand what is happening in Google Maps that allows the WMS overlay to be stretched onto the Google base layer.  So the explanation might need to be dumbed down into layman's terms for me to understand.

Many thanks.

Mike Quentel

----- Original Message ----
From: Tim Schaub <noreply at geocartic.com>
To: OpenLayers Users <users at openlayers.org>
Sent: Friday, 18 May, 2007 11:20:43 AM
Subject: Re: [OpenLayers-Users] WMS layers dynamically re-projected on to Google Maps base layer--how does this work?

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


_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users





	
	
		
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 



More information about the Users mailing list