Maps SDK for Web
tt.services.copyrights
New version copyrightsV2
The new copyrightsV2 service was introduced. We highly recommend using the new V2 version.
-
Old version
- The copyrights service has been deprecated.
- This service will be withdrawn following a 12 months deprecation period.
- The planned withdrawal period is June of 2022.
- Following withdrawal, requests to this service may receive an HTTP 404 error in response.
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.
Response
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>
The response is also extended by getTrackingId()
method, which returns the Tracking-ID
associated with the request.
Constructor
tt.services.copyrights([options], [additionalOptions])
Example
//a bounding box copyrights call
tt.services.copyrights({
key: <Your API key>,
boundingBox: '0, 0, 1, 1'
}).then(function(response) {
console.log(response);
});
//a tile-level copyrights call
tt.services.copyrights({
key: <Your API key>,
zoom: 1,
x: 1,
y: 1
}).then(function(response) {
console.log(response);
});
Parameters
Name | Description |
---|---|
options
Object default:None |
Options to be passed to the call |
additionalOptions
Object default:None |
Additional options to be passed to the service. |
additionalOptions.abortSignal
Object default:None |
Signal created with abortController.
Use AbortController to cancel requests in progress. Example
|
options.boundingBox
Maps.LngLatBounds | 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.
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.trackingId
String default:uuid |
Sets value of "Tracking-ID" header.
Specifies an identifier for the request. If not set by the user, UUID is generated for each 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. |