Maps SDK for Web
Class L.TomTomLayer
Tile layer for Leaflet that use the raster online maps from TomTom.
Constructor
L.TomTomLayer([options])
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.key | API key that can be obtained from
TomTom's developer portal.
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.
|
No | String | 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" |
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.