[OpenLayers-Users] Overlays with google maps

Graham Davis gdavis at refractions.net
Fri Mar 9 13:57:44 EST 2007


Chris,

Does this mean that I can't use a Kamap layer to overlay tiles on a 
Google maps base layer?  Is a WMS layer the only layer type that 
Openlayers can overlay ontop of a Google map?

We are trying to show overlay tiles from a Kamap layer (with a mercator 
projection) ontop of a Google map layer (which I believe is lat/long) 
but we are having trouble seeing results.

-- 
Graham Davis
Refractions Research Inc.
gdavis at refractions.net



Christopher Schmidt wrote:

>On Fri, Feb 16, 2007 at 05:02:03PM -0500, Stephen Woodbridge wrote:
>  
>
>>Hi all,
>>
>>We have been using OL with a ka-map tile-cache and are starting to work 
>>with google layers also. We generate route overlay images using s 
>>separate perl script. This script assumes a geographic projection (ie: 
>>lat-long) which is what out ka-map tiles are based on. We get perfect 
>>registration of the route with the ka-map tiles, but it is off for the 
>>google layer.
>>
>>What to I need to do to make the route align better with the google layers?
>>    
>>
>
>There is currently no way to use pre-cached tiles with Google Maps.
>Google uses a projection that is close to a simple mercator projection
>(+proj=merc), but the interactions through the API are all in decimal
>degrees. OpenLayers does not do reprojection on the client-side, so it
>does not speak to WMS in mercator while maintaining an internal concept
>of Google as being decimal-degrees based.
>
>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. (You can see this on the
>google.html in the examples.) However, there is no way to do this with
>pre-cached tiles, because Google will give different answers for tile
>locations depending on the center position of the map, so tile
>boundaries will not match.
>
>Regards,
>  
>


-- 
Graham Davis
Refractions Research Inc.
gdavis at refractions.net




More information about the Users mailing list