Maps SDK for Web
Documentation
Please, refer to pages for Maps SDK for Web in the TomTom Developer Portal for detailed documentation with examples.
In this section you will also find the latest version of this SDK.
Package content
The package contains the following files:
services-web.min.js
- Library prepared to be included direcly in your HTML file.services-web.min.js.map
- Source map for the SDK built file.services.min.js
- Library in UMD format. The code is minified and does not need any external dependencies.services.min.js.map
- Source map for the SDK built file.services-node.js
- Library designed for use in Node.js environment.services-node.js.map
- Source maps for the SDK built file.LICENSE.txt
- License file.README.md
- All foundation information about the SDK.
Getting started
This library can be used both on the client and node.js server.
Usage in browser
Services are accessible in a browser through window
under the tt namespace. Check the documentation at TomTom Developer Portal for detailed documentation with examples.
The minimal HTML page will allow the usage of the TomTom services which could look like this:
<html>
<head>
<script src="services-web.min.js"></script>
<script>
tt.services.copyrights({
key: "<your api key>"
}).go()
.then(function (results) {
console.log('Copyrights', results);
})
.catch(function (reason) {
console.log('Copyrights', reason);
})
</script>
</head>
<body></body>
</html>
Please note that you need to have a valid API Key which can be obtained at TomTom's Developer Portal.