[OSM-talk] how to point the openlayers instance to mapnik

Thomas Wood grand.edgemaster at gmail.com
Sun Mar 1 12:21:17 GMT 2009


There's an easier method than this, see:
http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example#Extensions

On 01/03/2009, Lambertus <osm at na1400.info> wrote:
> Lookup the map creating section in the JS code of your website where
> OpenLayers is used. It should look something like this:
>
> map = new OpenLayers.Map(
>
> Then add a new TMS layer pointing to your Mapnik instance. The example
> below shows two of the Mapnik instances used on the Dutch tileserver:
>
> var layerFastNL = new OpenLayers.Layer.TMS(
> 		"SpeedLayer",
> 		"http://93.186.180.157/",
>                  {type:'png', getURL: get_osm_url,
>                  border:1,
>                  transitionEffect: 'resize'} );
>
> var layerNL = new OpenLayers.Layer.TMS(
>                  "NL (current)",
>                  [
> "http://a.tile.openstreetmap.nl/tilecache.py/1.0.0/mapnik/",
> "http://b.tile.openstreetmap.nl/tilecache.py/1.0.0/mapnik/",
> "http://c.tile.openstreetmap.nl/tilecache.py/1.0.0/mapnik/"
>                  ],
>                  {type:'png', getURL: get_osm_url,
>                  border:1,
>                  maxExtent: new
> OpenLayers.Bounds(311549.5,6555477.5,822458.8125,7118943.5)}
> );
>
> That's about it.
>
>
> Kenneth Gonsalves wrote:
>> Hi,
>>
>> I have been working on doing my own slippy map with mapnik and mod_tile.
>> The
>> documentation mentions the following steps:
>>
>>     *  Download the planet file from planet.openstreetmap.org
>>     * Import into a PostGIS database using osm2pgsql
>>     * Set up mapnik and test using osm.xml and the generate_image.py
>>     * Compile and install mod_tile
>>     * Run the rendering daemon and ensure it can write to the tile storage
>>
>> directory
>>     * Configure your Apache server to load and run the module
>>     * Change the OpenLayers instance to point to your server
>>
>> After a long laborious battle I have reached the last stage. I need to
>> point
>> the openlayers instance to my server, but cannot find documentation how to
>> do
>> it. Can anyone point me to this?
>
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>


-- 
Regards,
Thomas Wood
(Edgemaster)




More information about the talk mailing list