forked from Snck3rs/contao-leaflet-libraries
Update leaflet providers to version 1.1.5.
This commit is contained in:
@@ -15,6 +15,10 @@ L.tileLayer.provider('Stamen.Watercolor').addTo(map);
|
||||
Leaflet-providers tries to use `https://` if the page uses `https://` and the provider supports it.
|
||||
You can force the use of `http://` by passing `force_http: true` in the options argument.
|
||||
|
||||
## Retina tiles
|
||||
|
||||
Some providers have retina tiles for which the URL only needs to be slightly adjusted, e.g. `-----@2x.png`. For this, add the retina option in the URL, e.g. `-----{retina}.png`, and set a retina value in the options, e.g. `retina: '@2x'`. If Leaflet detects a retina screen (`L.Browser.retina`), the retina option passed to the tileLayer is set to the value supplied, otherwise it's replaced by an empty string.
|
||||
|
||||
# Providers
|
||||
|
||||
Leaflet-providers provides tile layers from different providers, including *OpenStreetMap*, *MapQuestOpen*, *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.
|
||||
@@ -38,9 +42,9 @@ L.tileLayer.provider('HERE.terrainDay', {
|
||||
|
||||
### Mapbox
|
||||
|
||||
In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). If your user name is `YourName` and your map is called `MyMap` you can add it with:
|
||||
In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map ID and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects):
|
||||
```JavaScript
|
||||
L.tileLayer.provider('MapBox.YourName.MyMap');
|
||||
L.tileLayer.provider('MapBox', {id: 'ID', accessToken: 'ACCESS_TOKEN'}).addTo(map);
|
||||
```
|
||||
|
||||
### Esri/ArcGIS
|
||||
|
||||
Reference in New Issue
Block a user