Maps SDK for Web
tt.plugins.Minimap
This plugin provides a minimap functionality to your map.
To see the plugin in action, visit: Minimap example
CSS stylesheet
Minimap.css - CSS declarations for Minimap plugin. Without this stylesheet, dependant elements might appear in wrong place. It can be imported:
- in the
<head>
of your HTML document:
<link rel='stylesheet' type='text/css' href='https://api.tomtom.com/maps-sdk-for-web/cdn/plugins/Minimap/<version>/Minimap.css'>
- or if you're using Webpack with css-loader:
import '@tomtom-international/web-sdk-plugin-minimap/dist/Minimap.css';
To find current plugin's version, visit the Downloads page.
Constructor
tt.plugins.Minimap(options)
Example
{
ttMapsSdk: tt,
ignorePitchAndBearing: true,
zoomOffset: 5,
mapOptions: {
key: <your-api-key>,
dragRotate: false
}
}
Parameters
Name | Description |
---|---|
options
Object default:None |
The Options object. |
options.ttMapsSdk
Object default:None |
TomTom Maps SDK. |
options.mapOptions
Object default:None |
Map options. |
options.mapOptions.key
Object default:None |
Map key |
options.mapOptions.style
Object default:None |
Map style. |
options.zoomOffset
Number default:5 |
Zoom offset. Minimum value is 3. |
options.ignorePitchAndBearing
Number default:false |
When applied, |
options.cssStyleCheck
Boolean default:true |
If true, the plugin will check if required css styles are added. pitch and bearing changes won't affect the parent map. |
Methods
getMap( ): Maps.Map
Returns a map instance created for the use of this plugin.
Returns
An instance of a map.
onAdd(map): HTMLElement
Binds the map with the plugin instance.
Parameters
Name | Description |
---|---|
map
Maps.Map default:None |
Returns
container
onRemove( ): Void
Removes the plugin from the map.
Returns