Open Cycle Map with Leaflet Map Provider
-
Hello,
I’am trying to add Open Cycle Map on the Leaflet Map Provider. I have created a custom-leaflet.js and within this file i have:
GeoMashup.addAction( 'loadedMap', function ( properties, map ) { if( map.api == 'leaflet' ) { var subdomains = [1, 2, 3, 4]; this.cycle_map_tile = { name: 'OpenCycleMap', attribution: '? <a href="https://openstreetmap.org/" target="_blank">OpenStreetMap contributors</a>, <a href="https://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a>', url: 'https://tile.opencyclemap.org/cycle/{z}/{x}/{y}.png' }; map.addTileLayer( this.cycle_map_tile.url, 1.0, this.cycle_map_tile.name, this.cycle_map_tile.attribution, 0, 18, true, subdomains ); } );
This added a layer which i can select and is working. What i want to do now is to display this layer as the default one.
I’am using map.toggleTileLayer( this.cycle_map_tile.url );
but this is not working. How can i achieve this?Hopefully someone can help me…
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Open Cycle Map with Leaflet Map Provider’ is closed to new replies.