[Mapnik-users] mapnik openstreetmap and openlayer how?

Michal Migurski mike at stamen.com
Wed Oct 22 23:27:39 CEST 2008


Hi Lukasz,

I have an example of OSM used with OpenLayers here:
	http://teczno.com/old-oakland/

This is the OpenLayers code I'm using:
	http://teczno.com/old-oakland/OaklandLayers.js

The example is actually quite short. I'm using custom-rendered mapnik  
+ OSM tiles, but tile.openstreetmap.org and other TileCache-based  
providers use similar x, y, z coordinate-based tile URLs. Check the  
Layer args bits, esp. where the getURL functions are defined.

The bit that makes it all work like you'd expect is under mapArgs  
("... way to invoke a spherical mercator slippy grid map ...").

I can also talk about the OSM planet and Mapnik rendering process,  
which is a whole 'nother story.

-mike.

On Oct 22, 2008, at 12:08 PM, Lukasz Szybalski wrote:

> Hello,
> I am trying to display my map with open layers. I want to either use
> tile.openstreetmap.org or generate tiles myself using mapnik.
>
> Could anybody point me to a good manual on how to do this.
>
> For example:
>
> 1. I guess tile.openstreetmap.org doesn't use TMS and it uses
> something similar to google url scheme? How do I set openlayers to
> googlelike url encoding for use with openstreetmap or how do I set
> mapnik to render TMS style tiles?
>
> Or should I be doing something else? WMS or ...what exactly.??
>
> I'm looking for some advices on how to get this going
> osm planet -> mapnik -> tiles(png) -> openlayer ->display in browser
>
> Thanks,
> Lucas

----------------------------------------------------------------
michal migurski- mike at stamen.com
                  415.558.1610




More information about the Mapnik-users mailing list