πΊοΈ
Interactive Maps
High-performance vector maps with WebGL rendering via MapLibre GL JS. Reactive data binding out of the box.
10+ components, 15+ composables, full TypeScript support β build production-ready maps in minutes
bun add vue3-maplibre-glnpm install vue3-maplibre-glyarn add vue3-maplibre-glpnpm add vue3-maplibre-gl<template>
<Maplibre :options="mapOptions" style="height: 500px">
<GeoJsonSource :data="geoJsonData">
<FillLayer :style="fillStyle" />
<CircleLayer :style="circleStyle" />
</GeoJsonSource>
<Marker :lnglat="[0, 0]" :draggable="true" />
</Maplibre>
</template>
<script setup>
import { ref } from 'vue';
import { Maplibre, GeoJsonSource, FillLayer, CircleLayer, Marker } from 'vue3-maplibre-gl';
import 'vue3-maplibre-gl/dist/style.css';
const mapOptions = ref({
style: 'https://demotiles.maplibre.org/style.json',
center: [0, 0],
zoom: 2,
});
const geoJsonData = ref({
type: 'FeatureCollection',
features: [
{ type: 'Feature', geometry: { type: 'Point', coordinates: [0, 0] }, properties: {} },
],
});
const fillStyle = ref({ 'fill-color': '#088', 'fill-opacity': 0.8 });
const circleStyle = ref({ 'circle-radius': 6, 'circle-color': '#007cbf' });
</script>| Feature | |
|---|---|
| Vue 3 Native | Built for Composition API with full reactivity |
| Self-Contained | maplibre-gl bundled β one install, zero peer deps |
| SSR Safe | Works with Nuxt SSR/SSG without configuration |
| Type Safe | Comprehensive TypeScript definitions and event handler types |
| Zero Leaks | Factory-based cleanup with defense-in-depth patterns |
| Tiny Footprint | Tree-shakeable β import only what you use |