[OSM-talk] mapnik and openlayers?

Lukasz Szybalski szybalski at gmail.com
Thu Oct 23 16:12:25 BST 2008


On Thu, Oct 23, 2008 at 10:02 AM, Shaun McDonald
<shaun at shaunmcdonald.me.uk> wrote:
>
> On 23 Oct 2008, at 03:51, Lukasz Szybalski wrote:
>
>> On Wed, Oct 22, 2008 at 8:03 PM, Lukasz Szybalski <szybalski at gmail.com>
>> wrote:
>>>
>>> On Wed, Oct 22, 2008 at 5:16 PM, Shaun McDonald
>>> <shaun at shaunmcdonald.me.uk> wrote:
>>>>
>>>> On 22 Oct 2008, at 21:38, Lukasz Szybalski wrote:
>>>>
>>>>>> You've been pointed at a web page that tells you how to do that.
>>>>>> Please
>>>>>> go
>>>>>> and read it.
>>>>>
>>>>>
>>>>> So I've looked at the source code for the tw.openlayers which should
>>>>> correspond to openlayers java script file.
>>>>>
>>>>>
>>>>>
>>>>> http://toscawidgets.org/hg/tw.openlayers/file/387a2f19c67a/tw/openlayers/layer.py
>>>>>
>>>>> from layer import Layer, Grid, WMS, Google, Yahoo, VirtualEarth
>>>>> from layer import Vector, GML, OSMMapnik, OSMRenderer
>>>>>
>>>>> I assume these directly correspond to openlayers java script file.
>>>>> Which of these do I use to get my tiles?
>>>>> http://a.tah.openstreetmap.org/Tiles/tile/10/262/380.png
>>>>>
>>>>> I assume OSMMapnik is the one I should use? Correct?
>>>>>
>>>>
>>>> Why not use a little bit of trial and error?
>>>
>>>
>>> The following layer in my python code aka. tw.openlayers:
>>> my2 = OSMMapnik(name="tile",
>>>      url=['http://tah.openstreetmap.org/Tiles/tile/'],
>>>      options = {'layers': 'osm', 'format':'png'})
>>>
>>> generates the following layer in java script:
>>> new
>>> OpenLayers.Layer.OSM.Mapnik('tile',['http://tah.openstreetmap.org/Tiles/tile/'],{"layers":
>>> "osm", "format": "png"})
>>> What above javascript suppose to look like? (I can't find similar
>>> looking javascript on google)
>>>
>>
>> If I do:
>> OpenLayers.Layer.OSM.Mapnik("Mapnik")
>> this will render just fine from openstreetmaps.org
>>
>> How can I tell it to use my url (mydomain.com/path....)???
>>
>
> You will probably have to change the OSMMapnik code.
>

Is there an example where I could overwrite the url variable in the
OpenStreetMap.js outside of that file? . (Because the way its
delivered that file is more of a library file so I would like to keep
any changes to it outside of that file if possible? Is it possible to
overwrite url with mine url outside of openstreetmap.js.

What exactly is the difference between OSMMapnik vs osmarender.
(Performance? Features? Backend? Tiles generation?)

Thanks,
Lucas




More information about the talk mailing list