22
33Vue3 MapLibre GL provides a comprehensive set of Vue 3 components for building interactive maps with MapLibre GL JS. All components are designed with TypeScript support, reactive data binding, and comprehensive error handling.
44
5- ## Mapbox
5+ ## Maplibre
66
77The main map component that renders the MapLibre GL JS map. This is the core component that provides the map container and manages the MapLibre GL instance.
88
@@ -64,7 +64,7 @@ The main map component that renders the MapLibre GL JS map. This is the core com
6464
6565``` vue
6666<template>
67- <Mapbox
67+ <Maplibre
6868 :options="mapOptions"
6969 :debug="true"
7070 @load="onMapLoad"
@@ -83,12 +83,12 @@ The main map component that renders the MapLibre GL JS map. This is the core com
8383 <GeoJsonSource :data="geoJsonData">
8484 <FillLayer :style="fillStyle" />
8585 </GeoJsonSource>
86- </Mapbox >
86+ </Maplibre >
8787</template>
8888
8989<script setup>
9090import { ref } from 'vue';
91- import { Mapbox , GeoJsonSource, FillLayer } from 'vue3-maplibre-gl';
91+ import { Maplibre , GeoJsonSource, FillLayer } from 'vue3-maplibre-gl';
9292
9393const mapOptions = ref({
9494 style: 'https://demotiles.maplibre.org/style.json',
@@ -147,7 +147,7 @@ A component for adding GeoJSON data sources to the map. This component provides
147147
148148``` vue
149149<template>
150- <Mapbox :options="mapOptions">
150+ <Maplibre :options="mapOptions">
151151 <GeoJsonSource
152152 id="my-source"
153153 :data="geoJsonData"
@@ -157,12 +157,12 @@ A component for adding GeoJSON data sources to the map. This component provides
157157 >
158158 <CircleLayer :style="circleStyle" />
159159 </GeoJsonSource>
160- </Mapbox >
160+ </Maplibre >
161161</template>
162162
163163<script setup>
164164import { ref } from 'vue';
165- import { Mapbox , GeoJsonSource, CircleLayer } from 'vue3-maplibre-gl';
165+ import { Maplibre , GeoJsonSource, CircleLayer } from 'vue3-maplibre-gl';
166166
167167const geoJsonData = ref({
168168 type: 'FeatureCollection',
@@ -229,7 +229,7 @@ A component for rendering filled polygons from a data source. Supports all MapLi
229229
230230``` vue
231231<template>
232- <Mapbox :options="mapOptions">
232+ <Maplibre :options="mapOptions">
233233 <GeoJsonSource :data="polygonData">
234234 <FillLayer
235235 id="polygon-fill"
@@ -238,12 +238,12 @@ A component for rendering filled polygons from a data source. Supports all MapLi
238238 @click="onPolygonClick"
239239 />
240240 </GeoJsonSource>
241- </Mapbox >
241+ </Maplibre >
242242</template>
243243
244244<script setup>
245245import { ref } from 'vue';
246- import { Mapbox , GeoJsonSource, FillLayer } from 'vue3-maplibre-gl';
246+ import { Maplibre , GeoJsonSource, FillLayer } from 'vue3-maplibre-gl';
247247
248248const fillStyle = ref({
249249 'fill-color': [
@@ -288,16 +288,16 @@ Same events as FillLayer (click, mousemove, etc.)
288288
289289``` vue
290290<template>
291- <Mapbox :options="mapOptions">
291+ <Maplibre :options="mapOptions">
292292 <GeoJsonSource :data="pointData">
293293 <CircleLayer id="points" :style="circleStyle" @click="onPointClick" />
294294 </GeoJsonSource>
295- </Mapbox >
295+ </Maplibre >
296296</template>
297297
298298<script setup>
299299import { ref } from 'vue';
300- import { Mapbox , GeoJsonSource, CircleLayer } from 'vue3-maplibre-gl';
300+ import { Maplibre , GeoJsonSource, CircleLayer } from 'vue3-maplibre-gl';
301301
302302const circleStyle = ref({
303303 'circle-radius': ['interpolate', ['linear'], ['zoom'], 5, 2, 15, 10],
@@ -349,16 +349,16 @@ Same events as FillLayer (click, mousemove, etc.)
349349
350350``` vue
351351<template>
352- <Mapbox :options="mapOptions">
352+ <Maplibre :options="mapOptions">
353353 <GeoJsonSource :data="lineData">
354354 <LineLayer id="routes" :style="lineStyle" @click="onLineClick" />
355355 </GeoJsonSource>
356- </Mapbox >
356+ </Maplibre >
357357</template>
358358
359359<script setup>
360360import { ref } from 'vue';
361- import { Mapbox , GeoJsonSource, LineLayer } from 'vue3-maplibre-gl';
361+ import { Maplibre , GeoJsonSource, LineLayer } from 'vue3-maplibre-gl';
362362
363363const lineStyle = ref({
364364 'line-color': '#007cbf',
@@ -399,16 +399,16 @@ Same events as FillLayer (click, mousemove, etc.)
399399
400400``` vue
401401<template>
402- <Mapbox :options="mapOptions">
402+ <Maplibre :options="mapOptions">
403403 <GeoJsonSource :data="pointData">
404404 <SymbolLayer id="labels" :style="symbolStyle" @click="onSymbolClick" />
405405 </GeoJsonSource>
406- </Mapbox >
406+ </Maplibre >
407407</template>
408408
409409<script setup>
410410import { ref } from 'vue';
411- import { Mapbox , GeoJsonSource, SymbolLayer } from 'vue3-maplibre-gl';
411+ import { Maplibre , GeoJsonSource, SymbolLayer } from 'vue3-maplibre-gl';
412412
413413const symbolStyle = ref({
414414 'text-field': ['get', 'name'],
@@ -462,20 +462,20 @@ A component for adding HTML markers to the map. Supports custom HTML content, dr
462462
463463``` vue
464464<template>
465- <Mapbox :options="mapOptions">
465+ <Maplibre :options="mapOptions">
466466 <Marker
467467 :lng-lat="markerPosition"
468468 :draggable="true"
469469 @dragend="onMarkerDragEnd"
470470 >
471471 <div class="custom-marker">📍</div>
472472 </Marker>
473- </Mapbox >
473+ </Maplibre >
474474</template>
475475
476476<script setup>
477477import { ref } from 'vue';
478- import { Mapbox , Marker } from 'vue3-maplibre-gl';
478+ import { Maplibre , Marker } from 'vue3-maplibre-gl';
479479
480480const markerPosition = ref([0, 0]);
481481
@@ -524,19 +524,19 @@ A component for displaying popup windows on the map. Supports custom HTML conten
524524
525525``` vue
526526<template>
527- <Mapbox :options="mapOptions">
527+ <Maplibre :options="mapOptions">
528528 <PopUp :lng-lat="popupPosition" :close-button="true" @close="onPopupClose">
529529 <div class="popup-content">
530530 <h3>Hello World!</h3>
531531 <p>This is a popup at {{ popupPosition }}.</p>
532532 </div>
533533 </PopUp>
534- </Mapbox >
534+ </Maplibre >
535535</template>
536536
537537<script setup>
538538import { ref } from 'vue';
539- import { Mapbox , PopUp } from 'vue3-maplibre-gl';
539+ import { Maplibre , PopUp } from 'vue3-maplibre-gl';
540540
541541const popupPosition = ref([0, 0]);
542542
@@ -578,17 +578,17 @@ A component for managing and loading images for use in MapLibre GL styles. Suppo
578578
579579``` vue
580580<template>
581- <Mapbox :options="mapOptions">
581+ <Maplibre :options="mapOptions">
582582 <Image :images="mapImages" :show-loading="true" />
583583 <GeoJsonSource :data="pointData">
584584 <SymbolLayer :style="symbolStyle" />
585585 </GeoJsonSource>
586- </Mapbox >
586+ </Maplibre >
587587</template>
588588
589589<script setup>
590590import { ref } from 'vue';
591- import { Mapbox , Image, GeoJsonSource, SymbolLayer } from 'vue3-maplibre-gl';
591+ import { Maplibre , Image, GeoJsonSource, SymbolLayer } from 'vue3-maplibre-gl';
592592
593593const mapImages = ref([
594594 {
@@ -638,19 +638,19 @@ A component for adding geolocation controls to the map. Provides user location t
638638
639639``` vue
640640<template>
641- <Mapbox :options="mapOptions">
641+ <Maplibre :options="mapOptions">
642642 <GeolocateControls
643643 position="top-right"
644644 :options="geolocateOptions"
645645 @geolocate="onGeolocate"
646646 @error="onGeolocateError"
647647 />
648- </Mapbox >
648+ </Maplibre >
649649</template>
650650
651651<script setup>
652652import { ref } from 'vue';
653- import { Mapbox , GeolocateControls } from 'vue3-maplibre-gl';
653+ import { Maplibre , GeolocateControls } from 'vue3-maplibre-gl';
654654
655655const geolocateOptions = ref({
656656 positionOptions: {
0 commit comments