Last active
September 30, 2020 15:34
-
-
Save letswritetw/2e8a27ee3a4c16d8fc576ef4d518a3d4 to your computer and use it in GitHub Desktop.
leaflet-osm-basic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var baselayers = { | |
'OpenStreetMap.Mapnik': L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'), | |
'OpenStreetMap.DE': L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png'), | |
'OpenStreetMap.CH': L.tileLayer('https://tile.osm.ch/switzerland/{z}/{x}/{y}.png'), | |
'OpenStreetMap.France': L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png'), | |
'OpenStreetMap.HOT': L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'), | |
'OpenStreetMap.BZH': L.tileLayer('https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png'), | |
'OpenTopoMap': L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png') | |
}; | |
var overlays = {}; | |
L.control.layers(baselayers, overlays).addTo(map); | |
baselayers['OpenStreetMap.Mapnik'].addTo(map); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment