[OSM-dev] generate_tiles.py and openlayers issue
Jon Burgess
jburgess777 at googlemail.com
Fri Feb 29 21:12:02 GMT 2008
On Fri, 2008-02-29 at 16:49 +0000, Xin 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:
> http://localhost:3000/tiles/10/510/511.png
>
> http://localhost:3000/tiles/10/511/511.png
>
> http://localhost:3000/tiles/10/512/511.png
>
> http://localhost:3000/tiles/10/511/509.png
>
> http://localhost:3000/tiles/10/512/510.png
>
> ...
>
> I have these tiles:
> tiles/10/560/577.png
> tiles/10/560/578.png
> ...
>
> 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:
> http://pastie.caboo.se/159356
>
> I got the file from OSM svn.
>
> My OpenLayers JS config:
> http://pastie.caboo.se/159354
>
> I'm finding it hard to wrap my head around all this.
>
> Can anyone help at all?
>
According to:
http://almien.co.uk/OSM/Tools/Coord/?x=560&y=577&z=10
10/560/577.png -> Centre: -22.431206, 17.050781
http://almien.co.uk/OSM/Tools/Coord/?x=510&y=511&z=10
10/510/511.png -> Centre: 0.175780, -0.527344
The 10/560/577.png tile seems to match the co-ordinates which you wanted
to render and look at. This suggests the problem is somewhere in your
openlayers setup and not the tile rendering.
Jon
More information about the dev
mailing list