Skip to content

Commit

Permalink
Added TomTom layers (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
yecarrillo authored and jieter committed Aug 21, 2019
1 parent 9eb968f commit 3510c7a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ 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)

### 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

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:
Expand Down
18 changes: 18 additions & 0 deletions leaflet-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,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: {
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
options: {
Expand Down

0 comments on commit 3510c7a

Please sign in to comment.