# @tomtom-international/web-sdk-plugin-pancontrols

> Plugin that provides ability to pan map using ui controls

Latest version **2.1.6** (published 2021-03-17) · SEE LICENSE IN dist/LICENSE.txt license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @tomtom-international/web-sdk-plugin-pancontrols
pnpm add @tomtom-international/web-sdk-plugin-pancontrols
yarn add @tomtom-international/web-sdk-plugin-pancontrols
bun add @tomtom-international/web-sdk-plugin-pancontrols
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.1.6 |
| Published | 2021-03-17 |
| First published | 2019-09-06 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN dist/LICENSE.txt |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 29.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | TomTom |
| Maintainers | rijnb, brozak, bottleofrum, tt-js, zmatysek, marquese, tt-jssdk |

## Links

- npm: https://www.npmjs.com/package/@tomtom-international/web-sdk-plugin-pancontrols
- Homepage: https://developer.tomtom.com/maps-sdk-web-js
- npm.io page: https://npm.io/package/@tomtom-international/web-sdk-plugin-pancontrols

## Dependencies (1)

- [@tomtom-international/web-sdk-maps](https://npm.io/package/@tomtom-international/web-sdk-maps.md) latest

## Recent versions

- 2.1.6 (latest) — 2021-03-17
- 2.1.2-public-preview.4 (next) — 2021-01-04
- 2.1.4 — 2021-01-29
- 2.1.3 — 2021-01-19
- 2.1.2-public-preview.3 — 2020-12-21
- 2.1.2-public-preview.2 — 2020-12-18
- 1.0.13 — 2020-12-04
- 2.1.2-public-preview.1 — 2020-11-09
- 2.1.2-public-preview.0 — 2020-10-26
- 2.1.1-public-preview.0 — 2020-09-14
- 2.1.0-public-preview.0 — 2020-08-31
- 2.0.3-public-preview.0 — 2020-08-19
- 2.0.2-public-preview.0 — 2020-07-23
- 1.0.12 — 2020-05-11
- 1.0.11 — 2020-03-02
- … 6 more at https://npm.io/package/@tomtom-international/web-sdk-plugin-pancontrols/versions

## README

# Pan Plugin

A plugin that provides the ability to pan map using ui controls, for @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.\*.\***

## Instalation
Just do:
```
npm i @tomtom-international/web-sdk-plugin-pancontrols
```
You must also include the pan control stylesheet in your project. It's located here:
```
node_modules/@tomtom-international/web-sdk-plugin-pancontrols/dist/PanControls.css
```
## Usage
In this example we assume that you already have the Tomtom Maps SDK for Web library included.
```js

import tt from '@tomtom-international/web-sdk-maps';
import PanControls from '@tomtom-international/web-sdk-plugin-pancontrols';

const ttPanControls = new PanControls({
    className: 'my-class-name', // default = ''
    panOffset: 150 // default = 100
});

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

ttMap.addControl(ttPanControls, 'top-left');
```

---
_Source: https://npm.io/package/@tomtom-international/web-sdk-plugin-pancontrols · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
