Lukasz Szybalski schrieb:
> On Wed, Oct 22, 2008 at 9:23 AM, Ed Loach <[EMAIL PROTECTED]> wrote:
>   
>> I realise now that one of those two examples uses an offline tile
>> source - it's interesting to see how much the area around here has
>> changed, but not much use for you.
>>
>> Hopefully this one is more use?
>> http://www.openlayers.org/dev/examples/sundials-osm.html
>>
>> Ed
>>
>>     
>>> -----Original Message-----
>>> From: [EMAIL PROTECTED] [mailto:talk-
>>> [EMAIL PROTECTED] On Behalf Of Lukasz Szybalski
>>> Sent: 22 October 2008 14:51
>>> To: Grant Slater
>>> Cc: OSM Talk
>>> Subject: Re: [OSM-talk] mapnik and openlayers?
>>>
>>> On Wed, Oct 22, 2008 at 8:29 AM, Grant Slater
>>> <[EMAIL PROTECTED]> wrote:
>>>       
>>>> Lukasz Szybalski wrote:
>>>>         
>>>>> So its safe to assume that TMS is what mapnik provides?
>>>>>           
>>> (only) and if
>>>       
>>>>> I want WMS I would have to create that service on my server?
>>>>>
>>>>>           
>>>> Your server yes. OSM's tile servers do TMS only.
>>>>         
>>> So now what is the layer name for this url? I know the image is
>>> png:
>>>
>>> http://www.openlayers.org/dev/examples/tms.html
>>>
>>> I replaced the url with "http://tile.openstreetmap.org/"; what
>>> is the layer_name?
>>>
>>>       
>
> This is the code to get the maps but it doesn't have a TMS layer name
> ????????????????????????????
>
>
>
>  var mapnik = new OpenLayers.Layer.TMS(
> 34                    "OpenStreetMap (Mapnik)",
> 35                    "http://tile.openstreetmap.org/";,
> 36                    {
> 37                        type: 'png', getURL: osm_getTileURL,
> 38                        displayOutsideMaxExtent: true,
> 39                        attribution: '<a
> href="http://www.openstreetmap.org/";>OpenStreetMap</a>'
> 40                    }
>
>
> Anybody?
> http://www.openlayers.org/dev/examples/tms.html
>
>   

When you look at the URL of one maptile you will se something like
http://tile.openstreetmap.org/5/16/10.png
which is no typical URL for a TMS. A TMS url would be something like
http://example.com/1.0.0/layername/5/16/10.png

Now check the link Grant provided earlier to the Openlayers example for 
OSM. Here is it again:
http://wiki.openstreetmap.org/index.php/OpenLayers_Simple_Example

There is not just OpenLayers, but also an additional javascript file 
from OSM. This file provides the OSM
layertypes like
OpenLayers.Layer.OSM.Mapnik
OpenLayers.Layer.OSM.Maplint
OpenLayers.Layer.OSM.CycleMap

So I guess the Turbogears-Openlayers widget will not be to much help for 
you here. You can either extent the functionality of this widget to 
support OSM Layers, or write the neccessary Javascript yourself.

greetings,
nico




_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to