vue-maplibre

A simple library for Maplibre with vue 3 components, composition api and typescript support
425 4
Install
npm install vue-maplibre
Latest Version:0.1.0
Vue:3
License:MIT
Last Updated:Jun 3, 2026
Links: GitHub  ·  npm
Maintainer: chatondearu

GitHub issues CI

vue-maplibre

Vue 3 components and plugin helpers for building map interfaces with MapLibre GL.

Status

First public release 0.1.0 is prepared via Changesets.

Installation

pnpm add vue-maplibre maplibre-gl

maplibre-gl is required at runtime by the components.

Quickstart

// main.ts
import { createApp } from 'vue'
import VueMapLibre from 'vue-maplibre'
import App from './App.vue'

const app = createApp(App)

app.use(VueMapLibre, {
  style: 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json',
  i18n: false,
})

app.mount('#app')
<script setup lang="ts">
import { MapLibre } from 'vue-maplibre'
</script>

<template>
  <MapLibre
    :center="[10, 40]"
    :zoom="5"
  />
</template>

Public API (current)

Plugin

  • Default export: VueMapLibre
  • Install signature:
    • app.use(VueMapLibre, { style, i18n? })

Component

  • MapLibre
    • Props:
      • center?: LngLatLike
      • zoom?: number
      • minZoom?: number
      • maxZoom?: number
      • bounds?: LngLatBoundsLike
      • doubleClickZoom?: boolean
      • zoomControl?: boolean
      • i18n?: boolean
    • Events:
      • ready
      • move
      • zoomend
      • click

Environment notes

  • Mapbox URL transformation uses VITE_MAPBOX_TOKEN when needed by your style URLs.
  • MapLibre CSS is imported by the map component.

Documentation

  • Getting started and API docs live in docs/.
  • Run locally:
    • pnpm --filter vue-maplibre-docs dev

Development

pnpm install
pnpm dev
pnpm lint
pnpm build

Contributing

Please read CONTRIBUTING.md before opening a pull request.

Related Packages

vue-map-radius

A Vue 3 component for radius and polygon visualization on MapTiler maps

1,707 0
v-mapbox

Maplibre (and Mapbox) with Vue 💚

55,056 187

Version History

Version Released Vue License
0.1.0 ^3.5.0 MIT
0.0.1 MIT