Maps SDK for Web

tt.services.copyrights

The Copyrights service implementation provides a full copyrights notice in a HTML format that can be displayed to the user when the copyrights link is clicked.

The Copyrights API can take as an argument an area which concerns the copyrights. If this argument is omitted the whole world is considered.

The API handles the "edge of the world" issue. It allows the proper handling of bounding box that is outside of world extents (-180, -90, 180, 90).

Parameters need to be passed to the constructor. The method go performs the actual call.

The final response from the service is a HTML string with the copyrights information that have to be displayed. The whole respose is wrapped into a div element with the id copyrightMessage. Country names are enclosed within h4 elements and the copyrights information per each supplier is enclosed in p elements. This makes styling with CSS fairly easy. An example response may look like this:

<div id="copyrightMessage"><h4>General Copyrights:</h4>
  <p>© 1992 – 2018 TomTom. All rights reserved. This
  material is proprietary and the subject of
  copyrights protection, database right protection
  and other intellectual property rights owned
  by TomTom or its suppliers. The use of
  this material is subject to the terms of a license
  agreement. Any unauthorized copying or disclosure
  of this material will lead to criminal and civil
  liabilities.</p>
  <p>Data Source © 2018 TomTom</p>
</div>

Constructor

tt.services.copyrights([options])

Example
//a bounding box copyrights call
tt.services.copyrights({
  key: <Your API key>,
  boundingBox: '0, 0, 1, 1'
})
  .go()
  .then(function(response) {
    console.log(response);
  });

//a tile-level copyrights call
tt.services.copyrights({
  key: <Your API key>,
  zoom: 1,
  x: 1,
  y: 1
})
  .go()
  .then(function(response) {
    console.log(response);
  });
Parameters
Name Description
options
Object
default:None

Methods

go( ): Promise

Executes a predefined asynchronous task using the current configuration.

Returns