[OSM-dev] generate_tiles.py and openlayers issue
cartinus at xs4all.nl
Fri Feb 29 19:27:37 GMT 2008
On Fri, 29 Feb 2008 16:49:04 +0000
Xin <xin at zenpow.com> wrote:
> Hi Guys,
> I have been hellishly trying to get the the tiles generated from
> generate_tiles.py to work under OpenLayers. I am basing my OL code
> from http://trac.openlayers.org/wiki/UsingCustomTiles on the
> recommendation from an OL user.
> OL is expecting these files:
> I have these tiles:
> It's pretty close. So I'm thinking it might be a projection issue?
> In my mapnik config, I have set the projection to Google/OSM:
> <Map bgcolor="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137
> +lat_ts=0.0+lon_0= 0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m
> +nadgrids=@null +no_defs +over">
> In my generate_tiles.py:
> I got the file from OSM svn.
> My OpenLayers JS config:
> I'm finding it hard to wrap my head around all this.
> Can anyone help at all?
That example in the wiki looks to work almost the same as all the OSM
related slippy maps I looked at, except for a small difference. The
numbers in maxExtent and maxResolution I have seen so far have all been
integers and that example use numbers with a decimal point in them. I
don't know if the difference in rounding is enough to cause the
difference in tile names you see though, but it might be worth a try to
leave the decimal point and everything after it away.
More information about the dev