---
title: "Installation"
description: "Install @movk/maplibre and its peer dependencies, then choose between Nuxt or Vue + Vite setup."
canonical_url: "https://maplibre.mhaibaraai.cn/en/docs/getting-started/installation"
---
# Installation

> Install @movk/maplibre and its peer dependencies, then choose between Nuxt or Vue + Vite setup.

## Requirements

> [!NOTE]
> 
> - **MapLibre GL JS** — v6 (`maplibre-gl` as a peer dependency)
> - **Vue** — 3.4+
> - **Node.js** — `^20.19.0 || >=22.12.0`
> - MapLibre itself **needs no access token**; if you need Tianditu basemaps, you'll also need a Tianditu `tk`

## Install Dependencies

```bash [pnpm]
pnpm add @movk/maplibre maplibre-gl
```

```bash [npm]
npm install @movk/maplibre maplibre-gl
```

```bash [yarn]
yarn add @movk/maplibre maplibre-gl
```

For drawing support (`MaplibreDrawControl`), also install:

```bash [pnpm]
pnpm add terra-draw terra-draw-maplibre-gl-adapter
```

```bash [npm]
npm install terra-draw terra-draw-maplibre-gl-adapter
```

```bash [yarn]
yarn add terra-draw terra-draw-maplibre-gl-adapter
```

Install the other optional dependencies only when needed; the rest of the library works without them:

| Dependency | Purpose |
| --- | --- |
| `pmtiles` | [PMTiles](https://maplibre.mhaibaraai.cn/docs/extensions/pmtiles) single-file tile protocol |
| `@geomatico/maplibre-cog-protocol` | [COG](https://maplibre.mhaibaraai.cn/docs/extensions/cog) Cloud Optimized GeoTIFF protocol |
| `maplibre-contour` | [MaplibreContourLayer](https://maplibre.mhaibaraai.cn/docs/layers/contour) on-the-fly contours |
| `lottie-web` | [MaplibreLottieMarker](https://maplibre.mhaibaraai.cn/docs/core/lottie-marker) animated markers |

## Choose a Setup Method

[**Nuxt 4**](https://maplibre.mhaibaraai.cn/docs/getting-started/nuxt)

Register as a Nuxt module — components and composables are auto-imported.

[**Vue + Vite**](https://maplibre.mhaibaraai.cn/docs/getting-started/vue)

Use the Vite plugin + vue-plugin to use the same components in a plain Vue project.


## Sitemap

See the full [sitemap](https://maplibre.mhaibaraai.cn/sitemap.md) for all pages.
