Compare commits

...

1 Commits

Author SHA1 Message Date
David Molineus
de22e28c1f Update leaflet providers to 1.13.0 2022-02-22 08:48:52 +01:00
9 changed files with 633 additions and 200 deletions

View File

@@ -13,7 +13,7 @@ Contao CMS.
This package contains following packages: This package contains following packages:
- [leaflet 1.7.1](http://leafletjs.com) - [leaflet 1.7.1](http://leafletjs.com)
- [Leaflet-providers 1.3.1](http://leaflet-extras.github.io/leaflet-providers) - [Leaflet-providers 1.13.0](http://leaflet-extras.github.io/leaflet-providers)
- [Leaflet.markercluster 1.4.1](https://github.com/Leaflet/Leaflet.markercluster) - [Leaflet.markercluster 1.4.1](https://github.com/Leaflet/Leaflet.markercluster)
- [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore) - [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore)
- [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading) - [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading)

View File

@@ -1,31 +1,110 @@
# Leaflet-providers changelog # Leaflet-providers changelog
## 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)
- Update nlmaps.luchtfoto tiles url [#390](https://github.com/leaflet-extras/leaflet-providers/pull/390)
- Update NASAGIBS.ModisTerraSnowCover tiles url [#391](https://github.com/leaflet-extras/leaflet-providers/pull/391)
- Upgrade dependencies, add dependabot for npm/github actions [#392](https://github.com/leaflet-extras/leaflet-providers/pull/392)
- Switch JusticeMap and OpenAIP to https, remove GeoportailFrance.ignMaps from index.html [#393](https://github.com/leaflet-extras/leaflet-providers/pull/393)
- Replace OpenPtMap overlay by OPNVKarte layer [#396](https://github.com/Replace OpenPtMap overlay by OPNVKarte layer/pull/396)
- Updated maxzoom for CartoDB [#403](https://github.com/leaflet-extras/leaflet-providers/pull/403)
- Multiple dependencies updated by @dependabot
## 1.12.0 (2021-04-02)
- Add OpenAIP map provider [#374](https://github.com/leaflet-extras/leaflet-providers/pull/374)
- Migrate from travis to github actions [#375](https://github.com/leaflet-extras/leaflet-providers/pull/375)
- Fix typo in OpenStreetMap France attribution [#378](https://github.com/leaflet-extras/leaflet-providers/pull/378)
- Add OpenSnowMap map provider [#379](https://github.com/leaflet-extras/leaflet-providers/pull/379)
- Improve Geoportail resources [#382](https://github.com/leaflet-extras/leaflet-providers/pull/382)
- Remove Wikimedia map provider [#383](https://github.com/leaflet-extras/leaflet-providers/pull/383)
## 1.11.0 (2020-11-16)
- Update example Mapbox map_ID [#365](https://github.com/leaflet-extras/leaflet-providers/pull/365)
- Add USGS National Map tiles [#367](https://github.com/leaflet-extras/leaflet-providers/pull/367)
- Update preview libs and use leaflet 1.7.1 [#370](https://github.com/leaflet-extras/leaflet-providers/pull/370)
- Add Waymarked Trails overlay provider [#373](https://github.com/leaflet-extras/leaflet-providers/pull/373)
## 1.10.2 (2020-07-31)
- Update mversion dep [#357](https://github.com/leaflet-extras/leaflet-providers/pull/357)
- Mention stadia resitration in in README.md
- Update freemap.sk tiles url [#359](https://github.com/leaflet-extras/leaflet-providers/pull/357)
- Switch unpkg ressources to https on demo page [#361](https://github.com/leaflet-extras/leaflet-providers/pull/361)
- Update demo page and test pages to leaflet 1.6.0
- New (non dev) URLs for CyclOSM tiles [#363](https://github.com/leaflet-extras/leaflet-providers/pull/363)
## 1.10.1 (2020-05-18)
- Exclude MapTiler from demo
- Refine #348 : don't put jawg token in dist file
## 1.10.0 (2020-05-17)
- Add HERE API v3 [#343](https://github.com/leaflet-extras/leaflet-providers/pull/343)
- Add Stadia Maps layers [#344](https://github.com/leaflet-extras/leaflet-providers/pull/344)
- Updated Hydda layers maxZoom to 20 [#347](https://github.com/leaflet-extras/leaflet-providers/pull/347)
- Add Jawg Maps layers [#348](https://github.com/leaflet-extras/leaflet-providers/pull/348)
- Updated Mapbox to new static tiles api [#352](https://github.com/leaflet-extras/leaflet-providers/pull/352)
- Removed OpenMapSurfer layers [#354](https://github.com/leaflet-extras/leaflet-providers/pull/354)
- Add MapTiler Cloud layers [#355](https://github.com/leaflet-extras/leaflet-providers/pull/355)
## 1.9.1 (2019-12-06)
- Add Cyclosm layer [#335](https://github.com/leaflet-extras/leaflet-providers/pull/335)
- Fix nlmaps.luchtfoto url [#339](https://github.com/leaflet-extras/leaflet-providers/pull/339)
- basemapAT: add terrain, surface layers [#340](https://github.com/leaflet-extras/leaflet-providers/pull/340)
## 1.9.0 (2019-08-30)
- Add TomTom layers [#329](https://github.com/leaflet-extras/leaflet-providers/pull/329)
- Add Stamen.TerrainLabels overlay [#331](https://github.com/leaflet-extras/leaflet-providers/pull/331)
- Add HERE traffic tiles to normal and hybrid [#332](https://github.com/leaflet-extras/leaflet-providers/pull/332)
## 1.8.0 (2019-06-13)
- Removed OSM B&W layer from example file
- Removed bower.json file
- Add support for Thunderforest `Mobile Atlas` and `Neighbourhood` map variants [#325](https://github.com/leaflet-extras/leaflet-providers/pull/325)
## 1.7.0 (2019-05-14)
- Additional OpenMapSurfer layers & updated url for tiles [#322](https://github.com/leaflet-extras/leaflet-providers/pull/322)
## 1.6.0 (2019-03-28)
- Tile attribution improvements [#309](https://github.com/leaflet-extras/leaflet-providers/pull/309)
- Updated openmapsurfer tiles url [#310](https://github.com/leaflet-extras/leaflet-providers/pull/310)
- Switched wmflbs.org tiles to https [#311](https://github.com/leaflet-extras/leaflet-providers/pull/311)
- Removed OpenStreetMap Black and white [#319](https://github.com/leaflet-extras/leaflet-providers/pull/319)
## 1.5.0 (2018-11-06)
- Prevented redirect in Stamen [#299](https://github.com/leaflet-extras/leaflet-providers/pull/299)
- Fixed default mapbox layer [#303](https://github.com/leaflet-extras/leaflet-providers/pull/303)
- Updated CartoDB -> CARTO [#305](https://github.com/leaflet-extras/leaflet-providers/pull/305)
- Removed OpenInfraMap [#306](https://github.com/leaflet-extras/leaflet-providers/pull/306)
- Updated HERE url & comments [#307](https://github.com/leaflet-extras/leaflet-providers/pull/307)
## 1.4.0 (2018-08-25)
- Added [`OneMapSG`](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=OneMapSG), [#295](https://github.com/leaflet-extras/leaflet-providers/pull/295)
## 1.3.1 (2018-06-20) ## 1.3.1 (2018-06-20)
- No retina tiles for `Stamen.Watercolor` & `TopOSMRelief` [286](https://github.com/leaflet-extras/leaflet-providers/pull/286) - No retina tiles for `Stamen.Watercolor` & `TopOSMRelief` [#286](https://github.com/leaflet-extras/leaflet-providers/pull/286)
## 1.3.0 (2018-06-16) ## 1.3.0 (2018-06-16)
- Added `GeoportailFrance` provider [284](https://github.com/leaflet-extras/leaflet-providers/pull/284) - Added `GeoportailFrance` provider [284](https://github.com/leaflet-extras/leaflet-providers/pull/284)
- Removed mention to protocol relativity in README.md - Removed mention to protocol relativity in README.md
## 1.2.0 (2018-06-05) ## 1.2.0 (2018-06-05)
- Make preview usable locally [256](https://github.com/leaflet-extras/leaflet-providers/pull/256) - Make preview usable locally [#256](https://github.com/leaflet-extras/leaflet-providers/pull/256)
- Always use https when available [258](https://github.com/leaflet-extras/leaflet-providers/pull/258) - Always use https when available [#258](https://github.com/leaflet-extras/leaflet-providers/pull/258)
- Added API Key for OpenWeatherMap [260](https://github.com/leaflet-extras/leaflet-providers/pull/260) - Added API Key for OpenWeatherMap [#260](https://github.com/leaflet-extras/leaflet-providers/pull/260)
- Fixed attribution of basemap.at [261](https://github.com/leaflet-extras/leaflet-providers/pull/261) - Fixed attribution of basemap.at [#261](https://github.com/leaflet-extras/leaflet-providers/pull/261)
- Added installation instructions [263](https://github.com/leaflet-extras/leaflet-providers/pull/263) - Added installation instructions [#263](https://github.com/leaflet-extras/leaflet-providers/pull/263)
- Added `Wikimedia` provider [266](https://github.com/leaflet-extras/leaflet-providers/pull/266) - Added `Wikimedia` provider [#266](https://github.com/leaflet-extras/leaflet-providers/pull/266)
- Added `OpenInfraMap`/ `OpenPtMap` / `OpenRailwayMap` / `OpenFireMap` / `SafeCast` [266](https://github.com/leaflet-extras/leaflet-providers/pull/266) - Added `OpenInfraMap`/ `OpenPtMap` / `OpenRailwayMap` / `OpenFireMap` / `SafeCast` [#266](https://github.com/leaflet-extras/leaflet-providers/pull/266)
- Switched osm bzh to https [269](https://github.com/leaflet-extras/leaflet-providers/pull/269) - Switched osm bzh to https [#269](https://github.com/leaflet-extras/leaflet-providers/pull/269)
- Added `OpenStreetMap.CH` bounding box + `Wikimedia` retina parameter and correct maxZoom [271](https://github.com/leaflet-extras/leaflet-providers/pull/271) - Added `OpenStreetMap.CH` bounding box + `Wikimedia` retina parameter and correct maxZoom [#271](https://github.com/leaflet-extras/leaflet-providers/pull/271)
- Fixed test for providers keys - Fixed test for providers keys
- Mention leaflet in usage example in README.md - Mention leaflet in usage example in README.md
- Removed mention to `force_http` in README.md [273](https://github.com/leaflet-extras/leaflet-providers/pull/273) - Removed mention to `force_http` in README.md [#273](https://github.com/leaflet-extras/leaflet-providers/pull/273)
- Added informations about Thunderforest key in README.md [277](https://github.com/leaflet-extras/leaflet-providers/pull/277) - Added informations about Thunderforest key in README.md [#277](https://github.com/leaflet-extras/leaflet-providers/pull/277)
- Added retina support for `MapBox` [280](https://github.com/leaflet-extras/leaflet-providers/pull/280) - Added retina support for `MapBox` [#280](https://github.com/leaflet-extras/leaflet-providers/pull/280)
- Added `CartoDB.Voyager` variants `MapBox` [281](https://github.com/leaflet-extras/leaflet-providers/pull/281) - Added `CartoDB.Voyager` variants `MapBox` [#281](https://github.com/leaflet-extras/leaflet-providers/pull/281)
- Removed homegrown retina detection and added retina support for `CartoDB` & `Stamen` - Removed homegrown retina detection and added retina support for `CartoDB` & `Stamen`
## 1.1.17 (2017-06-29) ## 1.1.17 (2017-06-29)
- Added `maxZoom` for `Hydda` provider [242](https://github.com/leaflet-extras/leaflet-providers/pull/242) - Added `maxZoom` for `Hydda` provider [242](https://github.com/leaflet-extras/leaflet-providers/pull/242)

View File

@@ -6,5 +6,5 @@ rules:
- Don't violate a providers TOS (if it exists, include a link to it) - Don't violate a providers TOS (if it exists, include a link to it)
- Don't pre-populate api keys with working keys. - Don't pre-populate api keys with working keys.
- It should be a basic tile source, no exteral libraries etc. - It should be a basic tile source, no external libraries etc.
- The owner hasn't asked us to remove it (hasn't happened yet) - The owner hasn't asked us to remove it (hasn't happened yet)

View File

@@ -8,13 +8,13 @@ Download [leaflet-providers.js](https://raw.githubusercontent.com/leaflet-extras
<head> <head>
... ...
<script src="http://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script> <script src="http://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<script src="js/leaflet-providers.js"></script> <script src="js/leaflet-providers.js"></script>
</head> </head>
# Usage # Usage
Leaflet-providers [providers](#providers) are refered 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 `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.
```Javascript ```Javascript
// add Stamen Watercolor to map. // add Stamen Watercolor to map.
@@ -29,9 +29,17 @@ Leaflet-providers provides tile layers from different providers, including *Open
In addition to the providers you are free<b id="what-is-free">1</b> to use, we support some layers which require registration. In addition to the providers you are free<b id="what-is-free">1</b> to use, we support some layers which require registration.
### HERE (formerly Nokia). ### HERE and HEREv3 (formerly Nokia).
In order to use HERE layers, you must [register](http://developer.here.com/). Once registered, you can create an `app_id` and `app_code` which you have to pass to `L.tileLayer.provider` in the options: In order to use HEREv3 layers, you must [register](http://developer.here.com/). Once registered, you can create an `apiKey` which you have to pass to `L.tileLayer.provider` in the options:
```Javascript
L.tileLayer.provider('HEREv3.terrainDay', {
apiKey: '<insert apiKey here>'
}).addTo(map);
```
You can still pass `app_id` and `app_code` in legacy projects:
```Javascript ```Javascript
L.tileLayer.provider('HERE.terrainDay', { L.tileLayer.provider('HERE.terrainDay', {
@@ -40,18 +48,38 @@ L.tileLayer.provider('HERE.terrainDay', {
}).addTo(map); }).addTo(map);
``` ```
[Available HERE layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=HERE) ### Jawg Maps
In order to use Jawg Maps, you must [register](https://www.jawg.io/lab). Once registered, your access token will be located [here](https://www.jawg.io/lab/access-tokens) and you will access to all Jawg default maps (variants) and your own customized maps :
```JavaScript
L.tileLayer.provider('Jawg.Streets', {
variant: '<insert map id here or blank for default variant>',
accessToken: '<insert access token here>'
}).addTo(map);
```
### Mapbox ### Mapbox
In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map_ID (i.e mapbox.satellite) and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects): In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map_ID (e.g. "mapbox/satellite-v9") and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects):
```JavaScript ```JavaScript
L.tileLayer.provider('MapBox', { L.tileLayer.provider('MapBox', {
id: 'ID': '<insert map_ID here>', id: '<insert map_ID here>',
accessToken: '<insert ACCESS_TOKEN here>' accessToken: '<insert ACCESS_TOKEN here>'
}).addTo(map); }).addTo(map);
``` ```
The currently-valid Mapbox map styles, to use for map_IDs, [are listed in the Mapbox documentation](https://docs.mapbox.com/api/maps/#mapbox-styles) - only the final part of each is required, e.g. "mapbox/light-v10".
### MapTiler Cloud
In order to use MapTiler maps, you must [register](https://cloud.maptiler.com/). Once registered, get your API key from Account->Keys, which you have to pass to `L.tileLayer.provider` in the options:
```JavaScript
L.tileLayer.provider('MapTiler.Streets', {
key: '<insert key here>'
}).addTo(map);
```
### Thunderforest ### Thunderforest
In order to use Thunderforest maps, you must [register](https://thunderforest.com/pricing/). Once registered, you have an `api_key` which you have to pass to `L.tileLayer.provider` in the options: In order to use Thunderforest maps, you must [register](https://thunderforest.com/pricing/). Once registered, you have an `api_key` which you have to pass to `L.tileLayer.provider` in the options:
@@ -65,9 +93,19 @@ In order to use ArcGIS maps, you must [register](https://developers.arcgis.com/e
[Available Esri layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Esri) [Available Esri layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Esri)
### TomTom
In order to use TomTom layers, you must [register](https://developer.tomtom.com/user/register). Once registered, you can create an `apikey` which you have to pass to `L.tileLayer.provider` in the options:
```Javascript
L.tileLayer.provider('TomTom', {
apikey: '<insert your API key here>'
}).addTo(map);
```
### Geoportail France ### Geoportail France
In order to use Geoportail France resources, you need to obtain an [api key]( http://professionnels.ign.fr/ign/contrats/) that allows you to access the [resources](https://geoservices.ign.fr/documentation/donnees-ressources-wmts.html#ressources-servies-en-wmts-en-projection-web-mercator) you need. Pass this api key and the ID of the resource to display to `L.tileLayer.provider` in the options: In order to use Geoportail France resources, you need to obtain an [api key]( http://professionnels.ign.fr/ign/contrats/) that allows you to access the [resources](https://geoservices.ign.fr/documentation/donnees-ressources-wmts.html#ressources-servies-en-wmts-en-projection-web-mercator) you need. Pass this api key and the ID of the resource to display to `L.tileLayer.provider` in the options:
```JavaScript ```JavaScript
L.tileLayer.provider('GeoportailFrance', { L.tileLayer.provider('GeoportailFrance', {
variant: '<insert resource ID here>', variant: '<insert resource ID here>',
@@ -75,10 +113,13 @@ L.tileLayer.provider('GeoportailFrance', {
}).addTo(map); }).addTo(map);
``` ```
Please note that a public api key (`choisirgeoportail`) is used by default and comes with no guarantee. Please note that a public api key (`choisirgeoportail`) is used by default and comes with no guarantee.
4 aliases are also provided for common Geoportail resources : `GeoportailFrance`, `GeoportailFrance.orthos`, `GeoportailFrance.ignMaps` and `GeoportailFrance.parcels` (See index.html demo). 4 aliases are also provided for common Geoportail resources : `GeoportailFrance`, `GeoportailFrance.orthos`, `GeoportailFrance.ignMaps` and `GeoportailFrance.parcels` (See index.html demo).
### 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.
# Attribution # Attribution

View File

@@ -1,25 +0,0 @@
{
"name": "leaflet-providers",
"version": "1.1.17",
"homepage": "https://github.com/leaflet-extras/leaflet-providers",
"description": "An extension to Leaflet that contains configurations for various free tile providers.",
"dependencies": {
"leaflet": "~0.7.3"
},
"main": "leaflet-providers.js",
"keywords": [
"leaflet",
"stamen",
"osm"
],
"license": "BSD-2-Clause",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests",
"preview",
"*.html"
]
}

View File

@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- Leaflet style. REQUIRED! --> <!-- Leaflet style. REQUIRED! -->
<link rel="stylesheet" href="http://unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<style> <style>
html { height: 100% } html { height: 100% }
body { height: 100%; margin: 0; padding: 0;} body { height: 100%; margin: 0; padding: 0;}
@@ -26,7 +26,7 @@
</div> </div>
<div id="map" class="map"></div> <div id="map" class="map"></div>
<script src="http://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script> <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
<script src="leaflet-providers.js"></script> <script src="leaflet-providers.js"></script>
<script> <script>
var map = L.map('map', { var map = L.map('map', {
@@ -40,7 +40,6 @@
var baseLayers = { var baseLayers = {
'OpenStreetMap Default': defaultLayer, 'OpenStreetMap Default': defaultLayer,
'OpenStreetMap German Style': L.tileLayer.provider('OpenStreetMap.DE'), 'OpenStreetMap German Style': L.tileLayer.provider('OpenStreetMap.DE'),
'OpenStreetMap Black and White': L.tileLayer.provider('OpenStreetMap.BlackAndWhite'),
'OpenStreetMap H.O.T.': L.tileLayer.provider('OpenStreetMap.HOT'), 'OpenStreetMap H.O.T.': L.tileLayer.provider('OpenStreetMap.HOT'),
'Thunderforest OpenCycleMap': L.tileLayer.provider('Thunderforest.OpenCycleMap'), 'Thunderforest OpenCycleMap': L.tileLayer.provider('Thunderforest.OpenCycleMap'),
'Thunderforest Transport': L.tileLayer.provider('Thunderforest.Transport'), 'Thunderforest Transport': L.tileLayer.provider('Thunderforest.Transport'),
@@ -49,6 +48,8 @@
'Stamen Toner': L.tileLayer.provider('Stamen.Toner'), 'Stamen Toner': L.tileLayer.provider('Stamen.Toner'),
'Stamen Terrain': L.tileLayer.provider('Stamen.Terrain'), 'Stamen Terrain': L.tileLayer.provider('Stamen.Terrain'),
'Stamen Watercolor': L.tileLayer.provider('Stamen.Watercolor'), 'Stamen Watercolor': L.tileLayer.provider('Stamen.Watercolor'),
'Jawg Streets': L.tileLayer.provider('Jawg.Streets'),
'Jawg Terrain': L.tileLayer.provider('Jawg.Terrain'),
'Esri WorldStreetMap': L.tileLayer.provider('Esri.WorldStreetMap'), 'Esri WorldStreetMap': L.tileLayer.provider('Esri.WorldStreetMap'),
'Esri DeLorme': L.tileLayer.provider('Esri.DeLorme'), 'Esri DeLorme': L.tileLayer.provider('Esri.DeLorme'),
'Esri WorldTopoMap': L.tileLayer.provider('Esri.WorldTopoMap'), 'Esri WorldTopoMap': L.tileLayer.provider('Esri.WorldTopoMap'),
@@ -58,7 +59,12 @@
'Esri WorldPhysical': L.tileLayer.provider('Esri.WorldPhysical'), 'Esri WorldPhysical': L.tileLayer.provider('Esri.WorldPhysical'),
'Esri OceanBasemap': L.tileLayer.provider('Esri.OceanBasemap'), 'Esri OceanBasemap': L.tileLayer.provider('Esri.OceanBasemap'),
'Esri NatGeoWorldMap': L.tileLayer.provider('Esri.NatGeoWorldMap'), 'Esri NatGeoWorldMap': L.tileLayer.provider('Esri.NatGeoWorldMap'),
'Esri WorldGrayCanvas': L.tileLayer.provider('Esri.WorldGrayCanvas') 'Esri WorldGrayCanvas': L.tileLayer.provider('Esri.WorldGrayCanvas'),
'Geoportail France Maps': L.tileLayer.provider('GeoportailFrance'),
'Geoportail France Orthos': L.tileLayer.provider('GeoportailFrance.orthos'),
'USGS USTopo': L.tileLayer.provider('USGS.USTopo'),
'USGS USImagery': L.tileLayer.provider('USGS.USImagery'),
'USGS USImageryTopo': L.tileLayer.provider('USGS.USImageryTopo'),
}; };
var overlayLayers = { var overlayLayers = {
@@ -73,7 +79,14 @@
'OpenWeatherMap PressureContour': L.tileLayer.provider('OpenWeatherMap.PressureContour'), 'OpenWeatherMap PressureContour': L.tileLayer.provider('OpenWeatherMap.PressureContour'),
'OpenWeatherMap Wind': L.tileLayer.provider('OpenWeatherMap.Wind'), 'OpenWeatherMap Wind': L.tileLayer.provider('OpenWeatherMap.Wind'),
'OpenWeatherMap Temperature': L.tileLayer.provider('OpenWeatherMap.Temperature'), 'OpenWeatherMap Temperature': L.tileLayer.provider('OpenWeatherMap.Temperature'),
'OpenWeatherMap Snow': L.tileLayer.provider('OpenWeatherMap.Snow') 'OpenWeatherMap Snow': L.tileLayer.provider('OpenWeatherMap.Snow'),
'Geoportail France Parcels': L.tileLayer.provider('GeoportailFrance.parcels'),
'Waymarked Trails Hiking': L.tileLayer.provider('WaymarkedTrails.hiking'),
'Waymarked Trails Cycling': L.tileLayer.provider('WaymarkedTrails.cycling'),
'Waymarked Trails MTB': L.tileLayer.provider('WaymarkedTrails.mtb'),
'Waymarked Trails Ski Slopes': L.tileLayer.provider('WaymarkedTrails.slopes'),
'Waymarked Trails Riding': L.tileLayer.provider('WaymarkedTrails.riding'),
'Waymarked Trails Skating': L.tileLayer.provider('WaymarkedTrails.skating')
}; };
L.control.layers(baseLayers, overlayLayers, {collapsed: false}).addTo(map); L.control.layers(baseLayers, overlayLayers, {collapsed: false}).addTo(map);

View File

@@ -56,7 +56,7 @@
if (attr.indexOf('{attribution.') === -1) { if (attr.indexOf('{attribution.') === -1) {
return attr; return attr;
} }
return attr.replace(/\{attribution.(\w*)\}/, return attr.replace(/\{attribution.(\w*)\}/g,
function (match, attributionName) { function (match, attributionName) {
return attributionReplacer(providers[attributionName].options.attribution); return attributionReplacer(providers[attributionName].options.attribution);
} }
@@ -81,16 +81,10 @@
options: { options: {
maxZoom: 19, maxZoom: 19,
attribution: attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}, },
variants: { variants: {
Mapnik: {}, Mapnik: {},
BlackAndWhite: {
url: 'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png',
options: {
maxZoom: 18
}
},
DE: { DE: {
url: 'https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', url: 'https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
options: { options: {
@@ -108,13 +102,16 @@
url: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', url: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
options: { options: {
maxZoom: 20, maxZoom: 20,
attribution: '&copy; Openstreetmap France | {attribution.OpenStreetMap}' attribution: '&copy; OpenStreetMap France | {attribution.OpenStreetMap}'
} }
}, },
HOT: { HOT: {
url: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', url: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
options: { options: {
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>' attribution:
'{attribution.OpenStreetMap}, ' +
'Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> ' +
'hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
} }
}, },
BZH: { BZH: {
@@ -126,31 +123,17 @@
} }
} }
}, },
OpenInfraMap: {
url: 'https://tiles-{s}.openinframap.org/{variant}/{z}/{x}/{y}.png',
options: {
maxZoom: 18,
attribution:
'{attribution.OpenStreetMap}, <a href="http://www.openinframap.org/about.html">About OpenInfraMap</a>'
},
variants: {
Power: 'power',
Telecom: 'telecoms',
Petroleum: 'petroleum',
Water: 'water'
}
},
OpenSeaMap: { OpenSeaMap: {
url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png', url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
options: { options: {
attribution: 'Map data: &copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors' attribution: 'Map data: &copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
} }
}, },
OpenPtMap: { OPNVKarte: {
url: 'http://openptmap.org/tiles/{z}/{x}/{y}.png', url: 'https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png',
options: { options: {
maxZoom: 17, maxZoom: 18,
attribution: 'Map data: &copy; <a href="http://www.openptmap.org">OpenPtMap</a> contributors' attribution: 'Map <a href="https://memomaps.de/">memomaps.de</a> <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, map data {attribution.OpenStreetMap}'
} }
}, },
OpenTopoMap: { OpenTopoMap: {
@@ -181,6 +164,27 @@
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://blog.safecast.org/about/">SafeCast</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)' attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://blog.safecast.org/about/">SafeCast</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
} }
}, },
Stadia: {
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png',
options: {
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'
},
variants: {
AlidadeSmooth: {
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png'
},
AlidadeSmoothDark: {
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png'
},
OSMBright: {
url: 'https://tiles.stadiamaps.com/tiles/osm_bright/{z}/{x}/{y}{r}.png'
},
Outdoors: {
url: 'https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png'
}
}
},
Thunderforest: { Thunderforest: {
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}', url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
options: { options: {
@@ -209,36 +213,22 @@
}, },
Landscape: 'landscape', Landscape: 'landscape',
Outdoors: 'outdoors', Outdoors: 'outdoors',
Pioneer: 'pioneer' Pioneer: 'pioneer',
MobileAtlas: 'mobile-atlas',
Neighbourhood: 'neighbourhood'
} }
}, },
OpenMapSurfer: { CyclOSM: {
url: 'https://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}', url: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
options: { options: {
maxZoom: 20, maxZoom: 20,
variant: 'roads', attribution: '<a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> | Map data: {attribution.OpenStreetMap}'
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> &mdash; Map data {attribution.OpenStreetMap}'
},
variants: {
Roads: 'roads',
AdminBounds: {
options: {
variant: 'adminb',
maxZoom: 19
}
},
Grayscale: {
options: {
variant: 'roadsg',
maxZoom: 19
}
}
} }
}, },
Hydda: { Hydda: {
url: 'https://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png', url: 'https://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
options: { options: {
maxZoom: 18, maxZoom: 20,
variant: 'full', variant: 'full',
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> &mdash; Map data {attribution.OpenStreetMap}' attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> &mdash; Map data {attribution.OpenStreetMap}'
}, },
@@ -248,15 +238,71 @@
RoadsAndLabels: 'roads_and_labels' RoadsAndLabels: 'roads_and_labels'
} }
}, },
MapBox: { Jawg: {
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}', url: 'https://{s}.tile.jawg.io/{variant}/{z}/{x}/{y}{r}.png?access-token={accessToken}',
options: { options: {
attribution: attribution:
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; ' + '<a href="http://jawg.io" title="Tiles Courtesy of Jawg Maps" target="_blank">&copy; <b>Jawg</b>Maps</a> ' +
'Map data {attribution.OpenStreetMap}', '{attribution.OpenStreetMap}',
minZoom: 0,
maxZoom: 22,
subdomains: 'abcd', subdomains: 'abcd',
id: 'streets', variant: 'jawg-terrain',
// Get your own Jawg access token here : https://www.jawg.io/lab/
// NB : this is a demonstration key that comes with no guarantee
accessToken: '<insert your access token here>', accessToken: '<insert your access token here>',
},
variants: {
Streets: 'jawg-streets',
Terrain: 'jawg-terrain',
Sunny: 'jawg-sunny',
Dark: 'jawg-dark',
Light: 'jawg-light',
Matrix: 'jawg-matrix'
}
},
MapBox: {
url: 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}{r}?access_token={accessToken}',
options: {
attribution:
'&copy; <a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> ' +
'{attribution.OpenStreetMap} ' +
'<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>',
tileSize: 512,
maxZoom: 18,
zoomOffset: -1,
id: 'mapbox/streets-v11',
accessToken: '<insert your access token here>',
}
},
MapTiler: {
url: 'https://api.maptiler.com/maps/{variant}/{z}/{x}/{y}{r}.{ext}?key={key}',
options: {
attribution:
'<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',
variant: 'streets',
ext: 'png',
key: '<insert your MapTiler Cloud API key here>',
tileSize: 512,
zoomOffset: -1,
minZoom: 0,
maxZoom: 21
},
variants: {
Streets: 'streets',
Basic: 'basic',
Bright: 'bright',
Pastel: 'pastel',
Positron: 'positron',
Hybrid: {
options: {
variant: 'hybrid',
ext: 'jpg'
}
},
Toner: 'toner',
Topo: 'topo',
Voyager: 'voyager'
} }
}, },
Stamen: { Stamen: {
@@ -280,9 +326,10 @@
TonerLabels: 'toner-labels', TonerLabels: 'toner-labels',
TonerLite: 'toner-lite', TonerLite: 'toner-lite',
Watercolor: { Watercolor: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}', url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: { options: {
variant: 'watercolor', variant: 'watercolor',
ext: 'jpg',
minZoom: 1, minZoom: 1,
maxZoom: 16 maxZoom: 16
} }
@@ -301,8 +348,15 @@
maxZoom: 18 maxZoom: 18
} }
}, },
TerrainLabels: {
options: {
variant: 'terrain-labels',
minZoom: 0,
maxZoom: 18
}
},
TopOSMRelief: { TopOSMRelief: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}', url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: { options: {
variant: 'toposm-color-relief', variant: 'toposm-color-relief',
ext: 'jpg', ext: 'jpg',
@@ -318,6 +372,24 @@
} }
} }
}, },
TomTom: {
url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}',
options: {
variant: 'basic',
maxZoom: 22,
attribution:
'<a href="https://tomtom.com" target="_blank">&copy; 1992 - ' + new Date().getFullYear() + ' TomTom.</a> ',
subdomains: 'abcd',
style: 'main',
ext: 'png',
apikey: '<insert your API key here>',
},
variants: {
Basic: 'basic',
Hybrid: 'hybrid',
Labels: 'labels'
}
},
Esri: { Esri: {
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}', url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
options: { options: {
@@ -407,7 +479,7 @@
options: { options: {
maxZoom: 19, maxZoom: 19,
attribution: 'Map data &copy; <a href="http://openweathermap.org">OpenWeatherMap</a>', attribution: 'Map data &copy; <a href="http://openweathermap.org">OpenWeatherMap</a>',
apiKey:'<insert your api key here>', apiKey: '<insert your api key here>',
opacity: 0.5 opacity: 0.5
}, },
variants: { variants: {
@@ -427,20 +499,16 @@
HERE: { HERE: {
/* /*
* HERE maps, formerly Nokia maps. * HERE maps, formerly Nokia maps.
* These basemaps are free, but you need an API key. Please sign up at * These basemaps are free, but you need an api id and app key. Please sign up at
* http://developer.here.com/getting-started * https://developer.here.com/plans
*
* Note that the base urls contain '.cit' whichs is HERE's
* 'Customer Integration Testing' environment. Please remove for production
* envirionments.
*/ */
url: url:
'https://{s}.{base}.maps.cit.api.here.com/maptile/2.1/' + 'https://{s}.{base}.maps.api.here.com/maptile/2.1/' +
'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' + '{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
'app_id={app_id}&app_code={app_code}&lg={language}', 'app_id={app_id}&app_code={app_code}&lg={language}',
options: { options: {
attribution: attribution:
'Map &copy; 1987-2014 <a href="http://developer.here.com">HERE</a>', 'Map &copy; 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
subdomains: '1234', subdomains: '1234',
mapID: 'newest', mapID: 'newest',
'app_id': '<insert your app_id here>', 'app_id': '<insert your app_id here>',
@@ -461,11 +529,21 @@
normalDayGreyMobile: 'normal.day.grey.mobile', normalDayGreyMobile: 'normal.day.grey.mobile',
normalDayTransit: 'normal.day.transit', normalDayTransit: 'normal.day.transit',
normalDayTransitMobile: 'normal.day.transit.mobile', normalDayTransitMobile: 'normal.day.transit.mobile',
normalDayTraffic: {
options: {
variant: 'normal.traffic.day',
base: 'traffic',
type: 'traffictile'
}
},
normalNight: 'normal.night', normalNight: 'normal.night',
normalNightMobile: 'normal.night.mobile', normalNightMobile: 'normal.night.mobile',
normalNightGrey: 'normal.night.grey', normalNightGrey: 'normal.night.grey',
normalNightGreyMobile: 'normal.night.grey.mobile', normalNightGreyMobile: 'normal.night.grey.mobile',
normalNightTransit: 'normal.night.transit',
normalNightTransitMobile: 'normal.night.transit.mobile',
reducedDay: 'reduced.day',
reducedNight: 'reduced.night',
basicMap: { basicMap: {
options: { options: {
type: 'basetile' type: 'basetile'
@@ -496,6 +574,133 @@
variant: 'hybrid.day.mobile' variant: 'hybrid.day.mobile'
} }
}, },
hybridDayTransit: {
options: {
base: 'aerial',
variant: 'hybrid.day.transit'
}
},
hybridDayGrey: {
options: {
base: 'aerial',
variant: 'hybrid.grey.day'
}
},
hybridDayTraffic: {
options: {
variant: 'hybrid.traffic.day',
base: 'traffic',
type: 'traffictile'
}
},
pedestrianDay: 'pedestrian.day',
pedestrianNight: 'pedestrian.night',
satelliteDay: {
options: {
base: 'aerial',
variant: 'satellite.day'
}
},
terrainDay: {
options: {
base: 'aerial',
variant: 'terrain.day'
}
},
terrainDayMobile: {
options: {
base: 'aerial',
variant: 'terrain.day.mobile'
}
}
}
},
HEREv3: {
/*
* HERE maps API Version 3.
* These basemaps are free, but you need an API key. Please sign up at
* https://developer.here.com/plans
* Version 3 deprecates the app_id and app_code access in favor of apiKey
*
* Supported access methods as of 2019/12/21:
* @see https://developer.here.com/faqs#access-control-1--how-do-you-control-access-to-here-location-services
*/
url:
'https://{s}.{base}.maps.ls.hereapi.com/maptile/2.1/' +
'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
'apiKey={apiKey}&lg={language}',
options: {
attribution:
'Map &copy; 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
subdomains: '1234',
mapID: 'newest',
apiKey: '<insert your apiKey here>',
base: 'base',
variant: 'normal.day',
maxZoom: 20,
type: 'maptile',
language: 'eng',
format: 'png8',
size: '256'
},
variants: {
normalDay: 'normal.day',
normalDayCustom: 'normal.day.custom',
normalDayGrey: 'normal.day.grey',
normalDayMobile: 'normal.day.mobile',
normalDayGreyMobile: 'normal.day.grey.mobile',
normalDayTransit: 'normal.day.transit',
normalDayTransitMobile: 'normal.day.transit.mobile',
normalNight: 'normal.night',
normalNightMobile: 'normal.night.mobile',
normalNightGrey: 'normal.night.grey',
normalNightGreyMobile: 'normal.night.grey.mobile',
normalNightTransit: 'normal.night.transit',
normalNightTransitMobile: 'normal.night.transit.mobile',
reducedDay: 'reduced.day',
reducedNight: 'reduced.night',
basicMap: {
options: {
type: 'basetile'
}
},
mapLabels: {
options: {
type: 'labeltile',
format: 'png'
}
},
trafficFlow: {
options: {
base: 'traffic',
type: 'flowtile'
}
},
carnavDayGrey: 'carnav.day.grey',
hybridDay: {
options: {
base: 'aerial',
variant: 'hybrid.day'
}
},
hybridDayMobile: {
options: {
base: 'aerial',
variant: 'hybrid.day.mobile'
}
},
hybridDayTransit: {
options: {
base: 'aerial',
variant: 'hybrid.day.transit'
}
},
hybridDayGrey: {
options: {
base: 'aerial',
variant: 'hybrid.grey.day'
}
},
pedestrianDay: 'pedestrian.day', pedestrianDay: 'pedestrian.day',
pedestrianNight: 'pedestrian.night', pedestrianNight: 'pedestrian.night',
satelliteDay: { satelliteDay: {
@@ -519,11 +724,11 @@
} }
}, },
FreeMapSK: { FreeMapSK: {
url: 'http://t{s}.freemap.sk/T/{z}/{x}/{y}.jpeg', url: 'https://{s}.freemap.sk/T/{z}/{x}/{y}.jpeg',
options: { options: {
minZoom: 8, minZoom: 8,
maxZoom: 16, maxZoom: 16,
subdomains: '1234', subdomains: 'abcd',
bounds: [[47.204642, 15.996093], [49.830896, 22.576904]], bounds: [[47.204642, 15.996093], [49.830896, 22.576904]],
attribution: attribution:
'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 <a href="http://freemap.sk">Freemap.sk</a>' '{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 <a href="http://freemap.sk">Freemap.sk</a>'
@@ -537,11 +742,11 @@
} }
}, },
CartoDB: { CartoDB: {
url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.png', url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png',
options: { options: {
attribution: '{attribution.OpenStreetMap} &copy; <a href="http://cartodb.com/attributions">CartoDB</a>', attribution: '{attribution.OpenStreetMap} &copy; <a href="https://carto.com/attributions">CARTO</a>',
subdomains: 'abcd', subdomains: 'abcd',
maxZoom: 19, maxZoom: 20,
variant: 'light_all' variant: 'light_all'
}, },
variants: { variants: {
@@ -558,7 +763,7 @@
} }
}, },
HikeBike: { HikeBike: {
url: 'http://{s}.tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png', url: 'https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
options: { options: {
maxZoom: 19, maxZoom: 19,
attribution: '{attribution.OpenStreetMap}', attribution: '{attribution.OpenStreetMap}',
@@ -575,11 +780,12 @@
} }
}, },
BasemapAT: { BasemapAT: {
url: 'https://maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}', url: 'https://maps{s}.wien.gv.at/basemap/{variant}/{type}/google3857/{z}/{y}/{x}.{format}',
options: { options: {
maxZoom: 19, maxZoom: 19,
attribution: 'Datenquelle: <a href="https://www.basemap.at">basemap.at</a>', attribution: 'Datenquelle: <a href="https://www.basemap.at">basemap.at</a>',
subdomains: ['', '1', '2', '3', '4'], subdomains: ['', '1', '2', '3', '4'],
type: 'normal',
format: 'png', format: 'png',
bounds: [[46.358770, 8.782379], [49.037872, 17.189532]], bounds: [[46.358770, 8.782379], [49.037872, 17.189532]],
variant: 'geolandbasemap' variant: 'geolandbasemap'
@@ -593,6 +799,20 @@
}, },
grau: 'bmapgrau', grau: 'bmapgrau',
overlay: 'bmapoverlay', overlay: 'bmapoverlay',
terrain: {
options: {
variant: 'bmapgelaende',
type: 'grau',
format: 'jpeg'
}
},
surface: {
options: {
variant: 'bmapoberflaeche',
type: 'grau',
format: 'jpeg'
}
},
highdpi: { highdpi: {
options: { options: {
variant: 'bmaphidpi', variant: 'bmaphidpi',
@@ -614,14 +834,14 @@
minZoom: 6, minZoom: 6,
maxZoom: 19, maxZoom: 19,
bounds: [[50.5, 3.25], [54, 7.6]], bounds: [[50.5, 3.25], [54, 7.6]],
attribution: 'Kaartgegevens &copy; <a href="kadaster.nl">Kadaster</a>' attribution: 'Kaartgegevens &copy; <a href="https://www.kadaster.nl">Kadaster</a>'
}, },
variants: { variants: {
'standaard': 'brtachtergrondkaart', 'standaard': 'brtachtergrondkaart',
'pastel': 'brtachtergrondkaartpastel', 'pastel': 'brtachtergrondkaartpastel',
'grijs': 'brtachtergrondkaartgrijs', 'grijs': 'brtachtergrondkaartgrijs',
'luchtfoto': { 'luchtfoto': {
'url': 'https://geodata.nationaalgeoregister.nl/luchtfoto/rgb/wmts/1.0.0/2016_ortho25/EPSG:3857/{z}/{x}/{y}.png', 'url': 'https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_ortho25/EPSG:3857/{z}/{x}/{y}.jpeg',
} }
} }
}, },
@@ -657,7 +877,7 @@
}, },
ModisTerraSnowCover: { ModisTerraSnowCover: {
options: { options: {
variant: 'MODIS_Terra_Snow_Cover', variant: 'MODIS_Terra_NDSI_Snow_Cover',
format: 'png', format: 'png',
maxZoom: 8, maxZoom: 8,
opacity: 0.75 opacity: 0.75
@@ -703,7 +923,7 @@
// Justice Map (http://www.justicemap.org/) // Justice Map (http://www.justicemap.org/)
// Visualize race and income data for your community, county and country. // Visualize race and income data for your community, county and country.
// Includes tools for data journalists, bloggers and community activists. // Includes tools for data journalists, bloggers and community activists.
url: 'http://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png', url: 'https://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png',
options: { options: {
attribution: '<a href="http://www.justicemap.org/terms.php">Justice Map</a>', attribution: '<a href="http://www.justicemap.org/terms.php">Justice Map</a>',
// one of 'county', 'tract', 'block' // one of 'county', 'tract', 'block'
@@ -723,14 +943,6 @@
plurality: 'plural' plurality: 'plural'
} }
}, },
Wikimedia: {
url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png',
options: {
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
minZoom: 1,
maxZoom: 19
}
},
GeoportailFrance: { GeoportailFrance: {
url: 'https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}', url: 'https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}',
options: { options: {
@@ -741,28 +953,142 @@
// Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/ // Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/
// NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee // NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee
apikey: 'choisirgeoportail', apikey: 'choisirgeoportail',
format: 'image/jpeg', format: 'image/png',
style : 'normal', style: 'normal',
variant: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD' variant: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2'
}, },
variants: { variants: {
plan: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2',
parcels: { parcels: {
options : { options: {
variant: 'CADASTRALPARCELS.PARCELS', variant: 'CADASTRALPARCELS.PARCELLAIRE_EXPRESS',
maxZoom: 20, style: 'PCI vecteur',
style : 'bdparcellaire', maxZoom: 20
format: 'image/png'
} }
}, },
ignMaps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS',
maps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD',
orthos: { orthos: {
options: { options: {
maxZoom: 19, maxZoom: 19,
format: 'image/jpeg',
variant: 'ORTHOIMAGERY.ORTHOPHOTOS' variant: 'ORTHOIMAGERY.ORTHOPHOTOS'
} }
} }
} }
},
OneMapSG: {
url: 'https://maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png',
options: {
variant: 'Default',
minZoom: 11,
maxZoom: 18,
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
attribution: '<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data &copy; contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
},
variants: {
Default: 'Default',
Night: 'Night',
Original: 'Original',
Grey: 'Grey',
LandLot: 'LandLot'
}
},
USGS: {
url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}',
options: {
maxZoom: 20,
attribution: 'Tiles courtesy of the <a href="https://usgs.gov/">U.S. Geological Survey</a>'
},
variants: {
USTopo: {},
USImagery: {
url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}'
},
USImageryTopo: {
url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}'
}
}
},
WaymarkedTrails: {
url: 'https://tile.waymarkedtrails.org/{variant}/{z}/{x}/{y}.png',
options: {
maxZoom: 18,
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://waymarkedtrails.org">waymarkedtrails.org</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
},
variants: {
hiking: 'hiking',
cycling: 'cycling',
mtb: 'mtb',
slopes: 'slopes',
riding: 'riding',
skating: 'skating'
}
},
OpenAIP: {
url: 'https://{s}.tile.maps.openaip.net/geowebcache/service/tms/1.0.0/openaip_basemap@EPSG%3A900913@png/{z}/{x}/{y}.{ext}',
options: {
attribution: '<a href="https://www.openaip.net/">openAIP Data</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-NC-SA</a>)',
ext: 'png',
minZoom: 4,
maxZoom: 14,
tms: true,
detectRetina: true,
subdomains: '12'
}
},
OpenSnowMap: {
url: 'https://tiles.opensnowmap.org/{variant}/{z}/{x}/{y}.png',
options: {
minZoom: 9,
maxZoom: 18,
attribution: 'Map data: {attribution.OpenStreetMap} & ODbL, &copy; <a href="https://www.opensnowmap.org/iframes/data.html">www.opensnowmap.org</a> <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},
variants: {
pistes: 'pistes',
}
},
AzureMaps: {
url:
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
'&tilesetId={variant}&x={x}&y={y}&zoom={z}&language={language}'+
'&subscription-key={subscriptionKey}',
options: {
attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview for details.',
apiVersion: '2.0',
variant: 'microsoft.imagery',
subscriptionKey: '<insert your subscription key here>',
language: 'en-US',
},
variants: {
MicrosoftImagery: 'microsoft.imagery',
MicrosoftBaseDarkGrey: 'microsoft.base.darkgrey',
MicrosoftBaseRoad: 'microsoft.base.road',
MicrosoftBaseHybridRoad: 'microsoft.base.hybrid.road',
MicrosoftTerraMain: 'microsoft.terra.main',
MicrosoftWeatherInfraredMain: {
url:
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
'&tilesetId={variant}&x={x}&y={y}&zoom={z}'+
'&timeStamp={timeStamp}&language={language}' +
'&subscription-key={subscriptionKey}',
options: {
timeStamp: '2021-05-08T09:03:00Z',
attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview#uri-parameters for details.',
variant: 'microsoft.weather.infrared.main',
},
},
MicrosoftWeatherRadarMain: {
url:
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
'&tilesetId={variant}&x={x}&y={y}&zoom={z}'+
'&timeStamp={timeStamp}&language={language}' +
'&subscription-key={subscriptionKey}',
options: {
timeStamp: '2021-05-08T09:03:00Z',
attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview#uri-parameters for details.',
variant: 'microsoft.weather.radar.main',
},
}
},
} }
}; };

View File

@@ -1,46 +1,45 @@
{ {
"name": "leaflet-providers", "name": "leaflet-providers",
"version": "1.3.1", "version": "1.13.0",
"description": "An extension to Leaflet that contains configurations for various free tile providers.", "description": "An extension to Leaflet that contains configurations for various free tile providers.",
"main": "leaflet-providers.js", "main": "leaflet-providers.js",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/leaflet-extras/leaflet-providers.git" "url": "git://github.com/leaflet-extras/leaflet-providers.git"
}, },
"scripts": { "scripts": {
"test": "npm run lint && npm run testsuite", "test": "npm run lint && npm run testsuite",
"testsuite": "phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js tests/index.html", "testsuite": "mocha-chrome tests/index.html",
"lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*", "lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*",
"min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js", "min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js",
"release": "mversion patch -m", "release-patch": "mversion patch -m",
"release-minor": "mversion minor -m" "release-minor": "mversion minor -m"
}, },
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"bugs": { "bugs": {
"url": "https://github.com/leaflet-extras/leaflet-providers/issues" "url": "https://github.com/leaflet-extras/leaflet-providers/issues"
}, },
"files": [
"leaflet-providers.js",
"README.md",
"CHANGELOG.md",
"licence.md"
],
"devDependencies": {
"chai": "^4.1.2",
"eslint": "^3.16.1",
"eslint-plugin-html": "^2.0.1",
"mocha": "^3.2.0",
"mocha-phantomjs-core": "^2.1.1",
"mversion": "^1.10.1",
"phantomjs-prebuilt": "^2.1.16",
"uglify-js": "^2.4.15"
},
"autoupdate": {
"source": "git",
"target": "git://github.com/leaflet-extras/leaflet-providers.git",
"basePath": "/",
"files": [ "files": [
"leaflet-providers.js" "leaflet-providers.js",
] "README.md",
} "CHANGELOG.md",
} "licence.md"
],
"devDependencies": {
"chai": "^4.3.4",
"eslint": "^8.0.0",
"eslint-plugin-html": "^6.1.2",
"mocha": "^9.0.3",
"mocha-chrome": "^2.2.0",
"mversion": "^2.0.1",
"uglify-js": "^3.14.1"
},
"autoupdate": {
"source": "git",
"target": "git://github.com/leaflet-extras/leaflet-providers.git",
"basePath": "/",
"files": [
"leaflet-providers.js"
]
}
}

View File

@@ -27,7 +27,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
( (
'name' => 'Leaflet-providers', 'name' => 'Leaflet-providers',
'version' => '1.3.1', 'version' => '1.13.0',
'license' => '<a href="https://github.com/leaflet-extras/leaflet-providers/blob/master/license.md" target="_blank">BSD-2-Clause</a>', 'license' => '<a href="https://github.com/leaflet-extras/leaflet-providers/blob/master/license.md" target="_blank">BSD-2-Clause</a>',
'homepage' => 'http://leaflet-extras.github.io/leaflet-providers', 'homepage' => 'http://leaflet-extras.github.io/leaflet-providers',
'javascript' => 'assets/leaflet/libs/leaflet-providers/leaflet-providers.min.js' 'javascript' => 'assets/leaflet/libs/leaflet-providers/leaflet-providers.min.js'