πΊοΈ
Interactive Maps
High-performance vector maps with WebGL rendering via MapTiler SDK. Reactive data binding out of the box.
10 components, 38 composables, full TypeScript support β build production-ready maps in minutes
bun add vue3-maptiler-gl @maptiler/sdknpm install vue3-maptiler-gl @maptiler/sdkyarn add vue3-maptiler-gl @maptiler/sdkpnpm add vue3-maptiler-gl @maptiler/sdk<template>
<MapTiler :options="mapOptions" style="height: 500px">
<GeoJsonSource :data="geoJsonData">
<FillLayer :style="fillStyle" />
<CircleLayer :style="circleStyle" />
</GeoJsonSource>
<Marker :lnglat="[0, 0]" :draggable="true" />
</MapTiler>
</template>
<script setup>
import { ref } from 'vue';
import {
MapTiler,
GeoJsonSource,
FillLayer,
CircleLayer,
Marker,
} from 'vue3-maptiler-gl';
import '@maptiler/sdk/dist/maptiler-sdk.css';
import 'vue3-maptiler-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 |
| Single Runtime | @maptiler/sdk is a peer β one copy, on a version you pick |
| 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 |