From 743429db49253af9c7003aed06600761a34183a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Haberth=C3=BCr?= Date: Fri, 23 Dec 2016 22:31:11 +0100 Subject: [PATCH 1/2] Adding OSM B/W layer According to https://leaflet-extras.github.io/leaflet-providers/preview/ --- mplleaflet/maptiles.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mplleaflet/maptiles.py b/mplleaflet/maptiles.py index 9d8546b..51c20af 100644 --- a/mplleaflet/maptiles.py +++ b/mplleaflet/maptiles.py @@ -3,6 +3,11 @@ 'Map data (c) OpenStreetMap contributors' ) +osm_bw = ( + 'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', + '© OpenStreetMap' +) + mapquest_open = ( 'http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', 'Map tiles by MapQuest Data by OpenStreetMap, under CC BY SA.' @@ -47,6 +52,7 @@ tiles = { 'osm': osm, + 'osm_bw': osm_bw, 'mapquest open': mapquest_open, 'mapbox bright': mapbox_bright, 'thunderforest_landscape': thunderforest_landscape, From 788fd6e93532a2cf506d7183f944162b9a972b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Haberth=C3=BCr?= Date: Fri, 23 Dec 2016 22:43:39 +0100 Subject: [PATCH 2/2] Add stamen maps And also change the URL for `stamen_wc`, according to https://leaflet-extras.github.io/leaflet-providers/preview/ --- mplleaflet/maptiles.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/mplleaflet/maptiles.py b/mplleaflet/maptiles.py index 51c20af..89349ca 100644 --- a/mplleaflet/maptiles.py +++ b/mplleaflet/maptiles.py @@ -39,8 +39,24 @@ 'Tiles © Esri — Esri, HERE, DeLorme, Intermap, increment P Corp., GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), swisstopo, MapmyIndia, © OpenStreetMap contributors, GIS User Community' ) +stamen_toner = ( + 'http://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', + 'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap' +) + +stamen_tonerbackground = ( + 'http://stamen-tiles-{s}.a.ssl.fastly.net/toner-background/{z}/{x}/{y}.png', + 'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap' +) + +stamen_tonerlite = ( + 'http://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png', + 'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap' +) + + stamen_wc = ( - 'http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.png', + 'http://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png', 'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap' ) @@ -57,6 +73,9 @@ 'mapbox bright': mapbox_bright, 'thunderforest_landscape': thunderforest_landscape, 'esri_aerial': esri_aerial, + 'stamen_toner': stamen_toner, + 'stamen_tonerbackground': stamen_tonerbackground, + 'stamen_tonerlite': stamen_tonerlite, 'stamen_wc': stamen_wc, 'esri_natgeo': esri_natgeo, 'cartodb_positron': cartodb_positron,