Maps SDK for Web

tt

This object aggregates all necessary modules and classes to work with maps.

Please refer to the following documentation to check what properties and methods are included in the tt object.

Properties

Evented: Maps.Evented

Use this class to create a new Evented.

LngLat: Maps.LngLat

Use this class to create a new LngLat.

Marker: Maps.Marker

Use this class to create a new marker component.

Point: Maps.Point

Use this class to create a new Point.

Popup: Maps.Popup

Use this class to create a new popup component.

sdkInfo: Function

Returns SDK details. (e.g., version)

Methods

setProductInfo(productId, productVersion)

This method sets the content of the TomTom-User-Agent header. We are collecting anonymous data for statistics of usage of our services in order to increase the quality of our products.

Example
tt.setProductInfo('your-product-id', 'your-product-version');
Parameters
Name Description
productId
String
default:None
Identifier (e.g., a name) of your application e.g., MyApplication
productVersion
String
default:None
Version of your application e.g., 1.0.2

supported([options]): Boolean

This method allows you to check if the user's browser is supported.

Example
tt.supported() // = true
Parameters
Name Description
options
Object
default:None
Object with options
options.failIfMajorPerformanceCaveat
Boolean
default:None
If true, the function will return false if the performance of maps would be dramatically worse than expected (e.g. a software WebGL renderer would be used).
Returns