help about map URL settings (CloudMade map)

930 views
Skip to first unread message

Gabriele

unread,
May 15, 2012, 6:43:23 PM5/15/12
to Leaflet
Hello all,

I'd like to use the Leaflet JS with CloudMade maps, but I need some
help :)
I don't understand something about the URL construction:
'http://{s}.tile.cloudmade.com/YOUR-API-KEY/997/256/{z}/{x}/{y}.png'
what are the numbers 997/256 ?

I read in the quick start guide "Next we'll create a tile layer to add
to our map, in this case it's a CloudMade tile layer with Fresh style.
Creating a tile layer usually involves setting the URL template for
the tile images (get yours at CloudMade), the attribution text and the
maximum zoom level of the layer:".
So I did register on CludMade, I have my API key , and would like to
use their map called Tourist (styleId=7 using their exemple). How do I
refer to the Tourist map if I use Leaflet JS ?

thank you !

Gabriele

Jason Sanford

unread,
May 15, 2012, 6:53:16 PM5/15/12
to leafl...@googlegroups.com
In this case 997 is the style and 256 is the tile size (probably won't change that). So just replace 997 with the map style you prefer.

Gabriele

unread,
May 16, 2012, 4:53:22 AM5/16/12
to Leaflet
On May 16, 12:53 am, Jason Sanford <jasonsanf...@gmail.com> wrote:
> In this case 997 is the style and 256 is the tile size (probably won't
> change that). So just replace 997 with the map style you prefer.

Thank you :)
I now noticed the number in the bottom-right corner of the map is the
same as in the Leaflet exemple.
Maybe it would be a good idea to emphasize it in the documentation.

Gabriele

Dr. YSG

unread,
May 18, 2012, 11:29:01 AM5/18/12
to Leaflet
Just for the help of other readers, can you give a pointer to where
the styles (997, etc.) are documented?

as well as the range of the random subdomain numbers in the template
(the s value) which I suppose we should be rotating through?

Jason Sanford

unread,
May 18, 2012, 11:45:36 AM5/18/12
to leafl...@googlegroups.com
I'm not sure about a list of styles, but the tile URL scheme is documented here: http://developers.cloudmade.com/projects/tiles/documents

Dr. YSG

unread,
May 18, 2012, 1:40:58 PM5/18/12
to Leaflet
Thanks for the link, here is the info I got from there::

It seems they have just three subdomains (a, b and c) e.g.

http://b.tile.cloudmade.com/8ee2a50541944fb9bcedded5165f09d9/1/256/15/17599/10746.png

and here is the link to the style sheet explorer:

http://maps.cloudmade.com/editor#

Siyabonga Africa

unread,
Dec 6, 2012, 3:10:56 AM12/6/12
to leafl...@googlegroups.com
Hi Jason

I am also playing around with the example code which really is misleading. What I don't get in the CloudMade URL is the '{x}/{y}/{z}' section. I did some digging around and they say it's the x-tile, y-tile numbers and then we're given an equation to work these out which took me more than an hour because I don't know what lon_deg, lat_rad and ln(natural algorithm) is. And when I worked them out I still couldn't get the map to work.

Please help!!

Gabriele

unread,
Dec 6, 2012, 6:04:56 AM12/6/12
to leafl...@googlegroups.com

Il giorno giovedì 6 dicembre 2012 09:10:56 UTC+1, Siyabonga Africa ha scritto:
Hi Jason

I am also playing around with the example code which really is misleading. What I don't get in the CloudMade URL is the '{x}/{y}/{z}' section. I did some digging around and they say it's the x-tile, y-tile numbers and then we're given an equation to work these out which took me more than an hour because I don't know what lon_deg, lat_rad and ln(natural algorithm) is. And when I worked them out I still couldn't get the map to work.



Hello Siyabonga,

you can see a working exemple I just finished today here:
http://www.goldemotion.it/goldemotion-dove_leaflet.html

I used the "tourist map" (and I also updated the streets map in the OpenStreetMap project for the area shown in that website).

ciao
Gabriele

varun

unread,
Nov 22, 2013, 4:02:21 AM11/22/13
to leafl...@googlegroups.com

Dr. YSG

unread,
Nov 22, 2013, 10:24:49 AM11/22/13
to leafl...@googlegroups.com
Yes, I have seen this article, which is very good.

But I would like to know what is going on with EPSG4326 mapping. WebMercator does not work for our applications. Leaflet supports EPSG 4326 CRS. But I get some funny things at zoom levels 0 and 1.


Reply all
Reply to author
Forward
0 new messages