This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

Use Bike layer openstreetMap javascript

0

I would like to use the bike layer like this one:

https://www.openstreetmap.org/#map=14/37.7874/-2.9519&layers=C

But I don´t know which url to use. At the moment I have just the default one:

var map = L.map('map');
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  attribution: 'Map data &copy; <a href="http://www.osm.org">OpenStreetMap</a>'
}).addTo(map);

Any ideas?

Code from: https://github.com/mpetazzoni/leaflet-gpx

asked 01 Apr '20, 21:08

Cesp7's gravatar image

Cesp7
16111
accept rate: 0%


One Answer:

4

That particular layer is provided by Thunderforest which ordinarily operates as a subscription service (there appears to be a free hobby tier).

Usage instructions are here, which links to further tutorials.

answered 01 Apr '20, 23:03

InsertUser's gravatar image

InsertUser
11.0k1369185
accept rate: 19%