
LibreGL
Powerful Vue library for MapLibre
Maintained by Mustafa Omar
LibreGL provides a comprehensive Vue library for MapLibre with an intuitive API design and extensive collection of customizable components. It offers advanced features and patterns specifically designed for Vue developers building complex mapping applications.
Quick start
npm install libregl maplibre-gl@5<!-- main.ts: register the plugin once (required)
import { createApp } from 'vue'
import libregl from 'libregl'
import 'maplibre-gl/dist/maplibre-gl.css'
import App from './App.vue'
createApp(App).use(libregl, {}).mount('#app')
-->
<script setup lang="ts">
import { Map } from 'libregl'
const style = 'https://tiles.openfreemap.org/styles/liberty'
</script>
<template>
<Map height="400px" :center="[0, 20]" :zoom="2" :style="style" />
</template>›Setup noteschecked with v0.0.0
libregl brings MapLibre GL JS v5 as its own dependency; installing maplibre-gl@5 directly lets the CSS import resolve under strict package managers like pnpm. Registering the plugin with app.use(libregl) is required, because Map reads the plugin's options. Bind the style URL with :style, because a plain style attribute is treated as inline CSS by Vue.
Other platforms are on SDKs.