[Tilecache] Google Maps Overlay (image offset)

Steven M. Ottens steven at minst.net
Mon Jul 16 06:00:16 EDT 2007


Hi Josh,

Did you solve your googlemaps/tilecache problem? If so I'm interested in
your configuration; I want to use tilecache to cache layers which are
overlayed on top of google maps. So I need to know the resolutions to
set in tilecache.cfg

Regards,
Steven

Josh Livni wrote:
> Hi,
>
> I'm trying to overlay some tilecache images w/Google Maps.  It's 
> certainly theoretically possible (see Tim Schaub's demo at 
> http://dev.openlayers.org/sandbox/tschaub/google/examples/google-mercator.html) 
>
>
> However, when I try use the Google API outside of OpenLayers, I get 
> strange results.  Mainly, it seems the tiles that tilecache returns are 
> shifted a bit - by a consistent geographical amount for most zoom 
> levels, and by a large amount for a few zoomed out levels.
> I spent much of yesterday looking at the code and setting some more 
> debug notes, but ended up almost as confused as when I started. Here are 
> a couple examples showing level 0.  The first one, a direct mapserver 
> request, aligns perfectly on GMaps.  The 2nd, to Tilecache, has the same 
> bbox but returns an offset image:
> http://mapserver.eactive.org/cgi-bin/mapserv?map=/home/josh/tmp/world.map&TRANSPARENT=true&&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=world&STYLES=&FORMAT=image/gif&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:54004&BBOX=-20037508.03516647,-19994872.957813744,20037508.03516647,19994874.171103183&WIDTH=256&HEIGHT=256&reaspect=false 
>
>
> http://mapserver.eactive.org/tilecache/tilecache.py?TRANSPARENT=true&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=world&STYLES=&FORMAT=image/gif&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:54004&BBOX=-20037508.03516647,-19994872.957813744,20037508.03516647,19994874.171103183&WIDTH=256&HEIGHT=256&reaspect=false 
>
>
> An example showing these two layers together can be found at 
> http://gmaps.eactive.org/tctest.html
>
> It seems strange to me that not only does tilecache returns an offset 
> image, but that OpenLayers deals with that perfectly - aligning the 
> offset images nicely on top of Google Maps as shown in Tim's demo.
> My tilecache layer config is:
> [world]
> type=WMSLayer
> srs=EPSG:54004
> bbox=-20040000,-26334952,20035017,13740066
> resolutions=156543.031524,78271.515762,....,4.77731419445801
> levels=16
> url=http://mapserver.eactive.org/cgi-bin/mapserv?map=/home/josh/tmp/world.map&TRANSPARENT=true& 
>
> extension=gif
> debug=true
>
> If anyone has any clues as to how to get tilecache's grid cells(?) to 
> align more nicely with the GMap layout of the world, it would be greatly 
> appreciated.
>
> Thanks,
>
>  -Josh
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>   







More information about the Tilecache mailing list