[Tilecache] Current y value # is too far from tile corner y #

Christopher Schmidt crschmidt at metacarta.com
Thu Feb 28 09:49:34 EST 2008


On Thu, Feb 28, 2008 at 06:35:57AM -0800, Matt M wrote:
> Well, that seems to work, however the tiles seems to be misaligned somewhat.
> Is there something I'm missing?
> 
> For the getTileUrl() I have the following:
> 
> function (tile,zoom)
>     {
>         var url = "http://localhost/cgi-bin/tilecache.cgi/1.0.0/vmap0/";
>         var x = tile.x;
>         var y = tile.y;
>         return url + zoom + "/" + x + "/" + y + ".png";
>         
>     }
> 
> tilecache.cfg
> ------------------
> [vmap0]
> type=MapServer
> mapfile=/ms4w/Apache/htdocs/example.map
> layers=states_poly,states_line
> bbox=-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892
> maxResolution=156543.0339
> srs=EPSG:54004
> tms_type=google

Well, I'm guessing that you're using the wrong projection, since
"EPSG:54004" is usually associated with the standard 'mercator'
projection: the proj4 string you want is more typically associated with
EPSG:900913, and is described at
http://trac.openlayers.org/wiki/SphericalMercator . (If you're using a
recent version of TileCache, this should have been described 
in the tilecache.cfg in the 'Google Projection' comments.)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list