Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Stamen providers to reflect that they are now hosted by Stadia Maps #520

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Leaflet-providers changelog

## 2.0.0 (2023-08-04)

- [Breaking] Move Stamen styles to reflect that they are now hosted by Stadia Maps
- Add Stamen Terrain Lines
- Remove deprecated Stamen Toner Hybrid style (can be replicated by combining background and lines)
- Remove deprecated Stamen TopOSM styles
- Improve the overlay pattern match to grab a few more of the Stamen styles

## 1.13.0 (2021-10-19)
- Add Azure Maps Tiles provider [#384](https://github.com/leaflet-extras/leaflet-providers/pull/384)
- Fix nlmaps attribution link [#386](https://github.com/leaflet-extras/leaflet-providers/pull/386)
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Download [leaflet-providers.js](https://raw.githubusercontent.com/leaflet-extras

# Usage

Leaflet-providers [providers](#providers) are referred to with a `provider[.<variant>]`-string. Let's say you want to add the nice [Watercolor](http://maps.stamen.com/#watercolor/) style from Stamen to your map, you pass `Stamen.Watercolor` to the `L.tileLayer.provider`-constructor, which will return a [L.TileLayer](http://leafletjs.com/reference.html#tilelayer) instance for Stamens Watercolor tile layer.
Leaflet-providers [providers](#providers) are referred to with a `provider[.<variant>]`-string. Let's say you want to add the nice [Watercolor](http://maps.stamen.com/#watercolor/) style from Stamen to your map, you pass `Stadia.StamenWatercolor` to the `L.tileLayer.provider`-constructor, which will return a [L.TileLayer](http://leafletjs.com/reference.html#tilelayer) instance for Stamens Watercolor tile layer.

```Javascript
// add Stamen Watercolor to map.
L.tileLayer.provider('Stamen.Watercolor').addTo(map);
L.tileLayer.provider('Stadia.StamenWatercolor').addTo(map);
```

# Providers

Leaflet-providers provides tile layers from different providers, including *OpenStreetMap*, *Stamen*, *Esri* and *OpenWeatherMap*. The full listing of free to use layers can be [previewed](http://leaflet-extras.github.io/leaflet-providers/preview/index.html). The page will show you the name to use with `leaflet-providers.js` and the code to use it without dependencies.
Leaflet-providers provides tile layers from different providers, including *OpenStreetMap*, *Esri* and *OpenWeatherMap*. The full listing of free to use layers can be [previewed](http://leaflet-extras.github.io/leaflet-providers/preview/index.html). The page will show you the name to use with `leaflet-providers.js` and the code to use it without dependencies.

## Providers requiring registration

Expand Down Expand Up @@ -126,9 +126,16 @@ Please note that a public api key (`choisirgeoportail`) is used by default and c

4 aliases are also provided for common Geoportail resources : `GeoportailFrance`, `GeoportailFrance.orthos`, `GeoportailFrance.ignMaps` and `GeoportailFrance.parcels` (See index.html demo).

### Stadia Maps
### Stadia Maps

In order to use Stadia maps, you must [register](https://client.stadiamaps.com/signup/). Once registered, you can whitelist your domain within your account settings.
In order to use Stadia maps, you must [register](https://client.stadiamaps.com/signup/). Once registered, you can whitelist your domain within your account settings.

#### Stamen Design

As of July 31, 2023, Stamen's map styles are now hosted by [Stadia Maps](#stadia-maps). You can read the full
announcement from Stamen [here](http://maps.stamen.com/stadia-partnership/). No code changes are required to continue
using Stamen map styles hosted by Stadia Maps. Simply [register](https://client.stadiamaps.com/signup/) and whitelist
your domain.

# Attribution

Expand Down
10 changes: 7 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@
'Thunderforest OpenCycleMap': L.tileLayer.provider('Thunderforest.OpenCycleMap'),
'Thunderforest Transport': L.tileLayer.provider('Thunderforest.Transport'),
'Thunderforest Landscape': L.tileLayer.provider('Thunderforest.Landscape'),
'Stamen Toner': L.tileLayer.provider('Stamen.Toner'),
'Stamen Terrain': L.tileLayer.provider('Stamen.Terrain'),
'Stamen Watercolor': L.tileLayer.provider('Stamen.Watercolor'),
'Stamen Toner': L.tileLayer.provider('Stadia.StamenToner'),
'Stamen Toner Lite': L.tileLayer.provider('Stadia.StamenTonerLite'),
'Stamen Terrain': L.tileLayer.provider('Stadia.StamenTerrain'),
'Stamen Watercolor': L.tileLayer.provider('Stadia.StamenWatercolor'),
'Stadia Alidade Smooth': L.tileLayer.provider('Stadia.AlidadeSmooth'),
'Stadia Alidade Smooth Dark': L.tileLayer.provider('Stadia.AlidadeSmoothDark'),
'Stadia Outdoors': L.tileLayer.provider('Stadia.Outdoors'),
'Jawg Streets': L.tileLayer.provider('Jawg.Streets'),
'Jawg Terrain': L.tileLayer.provider('Jawg.Terrain'),
'Esri WorldStreetMap': L.tileLayer.provider('Esri.WorldStreetMap'),
Expand Down
197 changes: 120 additions & 77 deletions leaflet-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,23 +194,133 @@
}
},
Stadia: {
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png',
url: 'https://tiles.stadiamaps.com/tiles/{variant}/{z}/{x}/{y}{r}.{ext}',
options: {
minZoom: 0,
maxZoom: 20,
attribution: '&copy; <a href="https://stadiamaps.com/">Stadia Maps</a>, &copy; <a href="https://openmaptiles.org/">OpenMapTiles</a> &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'alidade_smooth',
ext: 'png'
},
variants: {
AlidadeSmooth: {
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png'
AlidadeSmooth: 'alidade_smooth',
AlidadeSmoothDark: 'alidade_smooth_dark',
OSMBright: 'osm_bright',
Outdoors: 'outdoors',
StamenToner: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_toner'
}
},
StamenTonerBackground: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_toner_background'
}
},
AlidadeSmoothDark: {
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png'
StamenTonerLines: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_toner_lines'
}
},
StamenTonerLabels: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_toner_labels'
}
},
StamenTonerLite: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_toner_lite'
}
},
OSMBright: {
url: 'https://tiles.stadiamaps.com/tiles/osm_bright/{z}/{x}/{y}{r}.png'
StamenWatercolor: {
url: 'https://tiles.stadiamaps.com/tiles/{variant}/{z}/{x}/{y}.{ext}',
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_watercolor',
ext: 'jpg',
minZoom: 1,
maxZoom: 16
}
},
StamenTerrain: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_terrain',
minZoom: 0,
maxZoom: 18
}
},
StamenTerrainBackground: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_terrain_background',
minZoom: 0,
maxZoom: 18
}
},
StamenTerrainLabels: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_terrain_labels',
minZoom: 0,
maxZoom: 18
}
},
Outdoors: {
url: 'https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png'
StamenTerrainLines: {
options: {
attribution:
'&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> ' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'{attribution.OpenStreetMap}',
variant: 'stamen_terrain_lines',
minZoom: 0,
maxZoom: 18
}
}
}
},
Expand Down Expand Up @@ -321,73 +431,6 @@
Voyager: 'voyager'
}
},
Stamen: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.{ext}',
options: {
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; ' +
'Map data {attribution.OpenStreetMap}',
subdomains: 'abcd',
minZoom: 0,
maxZoom: 20,
variant: 'toner',
ext: 'png'
},
variants: {
Toner: 'toner',
TonerBackground: 'toner-background',
TonerHybrid: 'toner-hybrid',
TonerLines: 'toner-lines',
TonerLabels: 'toner-labels',
TonerLite: 'toner-lite',
Watercolor: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: {
variant: 'watercolor',
ext: 'jpg',
minZoom: 1,
maxZoom: 16
}
},
Terrain: {
options: {
variant: 'terrain',
minZoom: 0,
maxZoom: 18
}
},
TerrainBackground: {
options: {
variant: 'terrain-background',
minZoom: 0,
maxZoom: 18
}
},
TerrainLabels: {
options: {
variant: 'terrain-labels',
minZoom: 0,
maxZoom: 18
}
},
TopOSMRelief: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: {
variant: 'toposm-color-relief',
ext: 'jpg',
bounds: [[22, -132], [51, -56]]
}
},
TopOSMFeatures: {
options: {
variant: 'toposm-features',
bounds: [[22, -132], [51, -56]],
opacity: 0.9
}
}
}
},
TomTom: {
url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}',
options: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leaflet-providers",
"version": "1.13.0",
"version": "2.0.0",
"description": "An extension to Leaflet that contains configurations for various free tile providers.",
"main": "leaflet-providers.js",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion preview/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
var overlayPatterns = [
'^(OpenWeatherMap|OpenSeaMap|OpenSnowMap)',
'OpenMapSurfer.(Hybrid|AdminBounds|ContourLines|Hillshade|ElementsAtRisk)',
'Stamen.Toner(Hybrid|Lines|Labels)',
'Stadia.StamenToner(Lines|Labels)',
'Stadia.StamenTerrain(Lines|Labels)',
'^JusticeMap',
'OpenAIP',
'OpenRailwayMap',
Expand Down
Loading