mapvue

MapVue is a comprehensive MapboxGL component library. You can easily and happily apply MapVue to your Vue projects. Import various data sources and layers in the form of components, and modify the state of the layer by modifying the parameters of props.
1,247 22
Install
npm install mapvue
Latest Version:0.3.3
Vue:3
License:MIT
Last Updated:Oct 16, 2025
Links: GitHub  ·  npm
Maintainer: timeroute

MapVue 🗺️

npm npm NPM GitHub last commit build codecov

📄 English README | Chinese README

👏🏻 English Doc | Chinese Doc

🌰 Examples

A well-packaged MapboxGL component library

MapVue is a comprehensive MapboxGL component library. You can easily and happily apply MapVue to your Vue projects. Import various data sources and layers in the form of components, and modify the state of the layer by modifying the parameters of props.

The purpose of MapVue is to allow users to develop GIS in Vue more concisely and efficiently.

How it works?

MapVue essentially wraps some classes in MapboxGL and implements componentization through some variable properties of the watch class.

For example, the v-fill-layer component actually wraps the FillLayer class.

Installation

# use npm
npm install mapbox-gl mapvue

# use yarn
yarn add mapbox-gl mapvue

# use pnpm
pnpm add mapbox-gl mapvue

Import

import { createApp } from "vue";
import MapVue from "mapvue";
import 'mapbox-gl/dist/mapbox-gl.css';
import App from "./App.vue";

createApp(App).use(MapVue).mount("#app");

Use Component

<script setup>
import { reactive } from "vue";
import token from "some-where";
</script>

<template>
  <v-map :accessToken="token" :options="state.mapOptions">
    <v-geo-source
      id="earthquakes"
      data="https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson"
      :cluster="true"
      :clusterMaxZoom="14"
      :clusterRadius="50"
    />
    <v-circle-layer 
      id="clusters" 
      source="earthquakes"
      :filter="['has', 'point_count']"
      ...
    />
  </v-map>
</template>

example

Related Packages

vue2mapbox-gl

Vue >2 integration of mapbox.

2,231 19
my-openlayer

my-openlayer 是一个基于 OpenLayers 的现代地图组件库,专为 Web GIS 应用开发者设计...

9,722 9
gis-map-szdp

GIS通用组件 - Vue 3 超图版本

6,714
mtk-map

基于 Vue 2 和 MapTalks 的地图组件库

2,043
gis-maplibre

基于 MapLibre GL 的 Vue3 GIS 地图组件库

1,303

Version History

Version Released Vue License
0.3.3 >=3.0 MIT
0.3.2 >=3.0 MIT
0.3.1 >=3.0 MIT
0.3.0 ^3.2.45 MIT
0.2.6 ^3.2.38 MIT