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 |
|
options.boundingBox
Object | Number[] | Object[] | String default:None |
Bounding box area in one of the supported formats.
The bounding box is a limited area within the search results. If it is omitted then the whole world will be taken into consideration. In case the area specified exceeds the world boundaries, the following actions will be taken depending on which side was exceeded:
|
options.key
String default:None |
A valid API Key for the requested service.
A valid API Key is required to make use of the given service. It can be issued in the Developer Portal. |
options.protocol
"http" | "https" default:"https" |
The protocol type to be used in the calls.
Represents the type of protocol used to perform a service call. |
options.x
Integer default:None |
The x axis value.
This option specifies the x axis value in a slippy map format. Only used for tile-level copyright calls. |
options.y
Integer default:None |
The y axis value.
This option specifies the y axis value in a slippy map format. Only used for tile-level copyright calls. |
options.zoom
Integer default:None |
The zoom level.
This option specifies the zoom level in a slippy map format. Only used for tile-level copyright calls. |
Methods
go( ): Promise
Executes a predefined asynchronous task using the current configuration.
Returns