2.1.6 • Published 3 years ago

@tomtom-international/web-sdk-plugin-minimap v2.1.6

Weekly downloads
47
License
SEE LICENSE IN di...
Repository
-
Last release
3 years ago

Minimap Plugin

This plugin adds a minimap to your existent Tomtom map (@tomtom-international/web-sdk-maps).

Please note that from version 2.0.0 this plugin only works with @tomtom-international/web-sdk-maps@6.*.*, if you are using @tomtom-international/web-sdk-maps@5.*.* please use version 1.*.*

Installation

Just do:

npm i @tomtom-international/web-sdk-plugin-minimap

You must also include the minimap stylesheet in your project. It's located here:

node_modules/@tomtom-international/web-sdk-plugin-minimap/dist/Minimap.css

Usage

In this example we assume that you already have the Tomtom Maps SDK for Web library included.

import tt from '@tomtom-international/web-sdk-maps';
import Minimap from '@tomtom-international/web-sdk-plugin-minimap';

const ttMinimap = new Minimap({
    ttMapsSdk: tt,
    zoomOffset: 5,
    ignorePitchAndBearing: true,
    mapOptions: {
        key: '<your-tomtom-maps-sdk-key>',
        dragRotate: false
    }
});

const map = tt.map({
    key: '<your-tomtom-maps-sdk-key>',
    container: 'map',
    center: [19.45773, 51.76217],
    zoom: 12
});

map.addControl(ttMinimap, 'bottom-right');
2.1.6

3 years ago

2.1.5

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago