Maps SDK for Web

tt.TomTomAttributionControl

The TomTomAttributionControl control presents the map's attribution information. We have provided functionality to extend it: you are able to add a HTML part to our control.

Constructor

tt.TomTomAttributionControl( )

Example
var map = tt.map({ ... });
var attributions = ['<a href="https://www.tomtom.com/mapshare/tools/">Report map issue</a>'];
map.getAttributionControl().addAttribution(attributions);

Methods

addAttribution(toAdd)

Adds the HTML content of the attribution control.

Parameters
Name Description
toAdd
String
default:None
Text that will be added to attributions. When multiple attributions are provided, "|" should be used as a separator.

getSeparator( ): String

Gets currently set separator, which will be used when merging attributions together

Returns

Default: ' | '

removeAttribution(toRemove)

Removes the HTML content of the attribution control.

Parameters
Name Description
toRemove
String
default:None
Text that will be removed from the attributions.

setSeparator(separator)

This method allows you to override default (' | ') separator, which is used when merging few attributions together.

Parameters
Name Description
separator
String
default:None
New separator.