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

Mike Quentel mikequentel at yahoo.com
Thu May 17 14:05:14 EDT 2007


I saw a post concerning how a WMS can be overlayed on Google Maps.  I've experimented with WMS such as TerraServer, on the google.html example, like this: 

var wmsTerraServerLayer =  new OpenLayers.Layer.WMS("TerraServer Topos", "http://terraserver.microsoft.com/ogcmap6.ashx", {layers: "DRG", format: "image/jpeg"}, {isBaseLayer: false}, {"buffer": 1});

I also saw the reply to http://openlayers.org/pipermail/users/2007-February/000756.html

The reply mentions:

"The WMS layer will automatically reproject, when using overlays, asking
Google for the geographic location of tile corners, and then
'stretching' the WMS request to match".

How does this work?  Using TerraServer, I replicated the re-projection behaviour in the google.html example, then did a right click on the TerraServer image to see what the URL looks like:

http://terraserver.microsoft.com/ogcmap6.ashx?LAYERS=DRG&FORMAT=image%2Fjpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-112.5%2C37.71859%2C-90%2C53.330873&WIDTH=256&HEIGHT=256

The URL still reads EPSG: 4326, which is WGS84.  Google Maps uses Mercator (54004).  How is the TerraServer image being stretched?  Is this something happening through Google?  Please do explain.

Thank you.

Mike Quentel





	
	
		
___________________________________________________________ 
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