Support » Plugin: Leaflet Map » How to select a specific layer (such as the Cycle Map)?

  • Resolved BFred

    (@bfred)


    Hi!

    I’m trying to select the cycle map rather than the default layer but haven’t figured how to do that yet. Is that possible and can someone help me out?
    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi fred
    In the backend default settings of the plugin you can define the map tile URL.
    Use instead of openstreetmap.org opencyclemap.org

    • This reply was modified 2 years, 1 month ago by bergblume.
    Plugin Author bozdoz

    (@bozdoz)

    if the cycle map is a tile url, you can pass it to the leaflet-map shortcode:

    [leaflet-map tileurl=https://the-cycle-map.com/{x}/{y}/{z}.jpg]

    Plugin Author bozdoz

    (@bozdoz)

    You may not be able to do it without an api key. Looks like opencyclemap.org gets their tiles from thunderforest:

    https://a.tile.thunderforest.com/cycle/18/129724/86427.png?apikey=a5dd6a2f1c934394bce6b0fb077203eb

    Hi,
    Thanks for all the prompt answers. The cycle map is a layer of OpenStreetMap. There are 4 of them: the Standard one which the plugin is using if you use the OSM tiles, then the Cycle Map, the Transport Map and the Humanitarian layer.

    So my question is while using OSM tiles can I, and if so how do I instruct the plugin to use that specific layer?

    Thank you.

    @bfred I just tried it out
    you can use this shortcode
    [leaflet-map address="Berlin, Germany" tileurl=http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png]

    BFred

    (@bfred)

    oh so actually opencyclemap.org is OSM Cycle map. Sorry I didn’t realize that. I’ll give it a try then, thank you very much!

    Fred

    BFred

    (@bfred)

    ok, it works BUT indeed there is a need for a key. It’s free up to 150,000 impressions a month. So there is no way to add ‘&layer=C’ to the OSM title URL?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to select a specific layer (such as the Cycle Map)?’ is closed to new replies.