Maps SDK for Web

Class L.TomTomLayer

Tile layer for Leaflet that use the Maps API - Raster from TomTom.

Constructor

L.TomTomLayer([options], [options.key] API key that can be obtained from [TomTom's developer portal], [options.language] Language to be used for map labels. Should be one of supported IETF language tags described [here](https://developer.tomtom.com/maps-api/maps-api-documentation-raster/raster-tile#listOfSupportedLanguages). When data in specified language is not available for a specific label, [default language])

Parameters
Name Description Required Type/Values Default
options It accepts all the options that Leaflet's TileLayer allows. The additional options, which are TomTom specific, are described below. No Object None
options.style The base map style to use No "main" | "night" "main"
options.layer The base map's layer to use No "basic" | "hybrid" | "labels" "basic"
[options.key] API key that can be obtained from [TomTom's developer portal] (https://developer.tomtom.com). When the key is passed on the map's initialization, it is set globally for all the services. It can be overwritten with the tomtom.key() method globally or per service with tomtom.<service_name>.key() functions. It is also possible to pass a specific key while working with instances of the services. Yes String None
[options.language] Language to be used for map labels. Should be one of supported IETF language tags described [here](https://developer.tomtom.com/maps-api/maps-api-documentation-raster/raster-tile#listOfSupportedLanguages). When data in specified language is not available for a specific label, [default language] (https://developer.tomtom.com/maps-api/maps-api-documentation-raster/raster-tile#defaultLanguageAlgorithm) is used. Yes String None
Example
var tomtomLayer = new L.TomTomLayer({key: "<Your API key>"});

Properties

name: String

Default: "raster"

Name of raster layer. It can be used to differentiate layers.