Maps SDK for Web
tt.services.staticImage
This Class makes it easy to generate a URL string to request a static map image using the TomTom Maps API - Static Image.
Parameters need to be passed to the constructor. The method go generates the URL string.
Constructor
tt.services.staticImage([options])
Example
// Passing an object with all the configuration
function callbackFn(urlString) {
console.log(urlString);
}
tt.services.staticImage({
key: <Your API key>,
zoom: 15,
bbox: [
[40.712, -74.227],
[40.774, -74.125]
]
})
.go()
.then(callbackFn);
Parameters
Name | Description |
---|---|
options
Object default:None |
Options to be passed to the routing call, or an array of such options objects to perform a batch request. |
Methods
go( ): Promise
Executes a predefined asynchronous task using the current configuration.
Returns