Skip to content

Commit 2890d90

Browse files
committed
Merge branch 'release/2.7.2'
2 parents bfa877e + 0151926 commit 2890d90

File tree

11 files changed

+542
-406
lines changed

11 files changed

+542
-406
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format
44

55
## [Unreleased]
66

7+
## [v2.7.2](https://github.com/studiometa/vue-mapbox-gl/compare/2.7.1...2.7.2) (2025-02-12)
8+
9+
### Fixed
10+
11+
- Fix Mapbox trying to remove controls already removed ([#249](https://github.com/studiometa/vue-mapbox-gl/issues/249), [#259](https://github.com/studiometa/vue-mapbox-gl/pull/259), [0bfaea6](https://github.com/studiometa/vue-mapbox-gl/commit/0bfaea6))
12+
713
## [v2.7.1](https://github.com/studiometa/vue-mapbox-gl/compare/2.7.0...2.7.1) (2025-02-04)
814

915
### Changed

package-lock.json

+497-396
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-workspace",
33
"private": true,
4-
"version": "2.7.1",
4+
"version": "2.7.2",
55
"type": "module",
66
"workspaces": [
77
"packages/*"
@@ -31,7 +31,7 @@
3131
"dependencies": {
3232
"@vitejs/plugin-vue": "5.2.1",
3333
"@vue/tsconfig": "0.7.0",
34-
"vite": "6.0.11",
34+
"vite": "6.1.0",
3535
"vite-plugin-dts": "4.5.0",
3636
"vue-tsc": "2.2.0"
3737
}

packages/demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-demo",
3-
"version": "2.7.1",
3+
"version": "2.7.2",
44
"scripts": {
55
"dev": "nuxt dev",
66
"build": "nuxt build"

packages/demo/pages/index.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
import 'mapbox-gl/dist/mapbox-gl.css';
1818
import '@mapbox/mapbox-gl-geocoder/lib/mapbox-gl-geocoder.css';
1919

20-
const { accessToken } = useRuntimeConfig();
20+
const {
21+
public: { accessToken },
22+
} = useRuntimeConfig();
2123
const lng = ref(0);
2224
const lat = ref(0);
2325
const zoom = ref(1);

packages/demo/pages/issue-249.vue

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<script setup>
2+
import { ref } from 'vue';
3+
import { MapboxMap, MapboxGeocoder } from '@studiometa/vue-mapbox-gl';
4+
import 'mapbox-gl/dist/mapbox-gl.css';
5+
import '@mapbox/mapbox-gl-geocoder/lib/mapbox-gl-geocoder.css';
6+
7+
const config = useRuntimeConfig();
8+
const showMap = ref(true);
9+
</script>
10+
11+
<template>
12+
<div>
13+
<label>
14+
<input v-model="showMap" type="checkbox" />
15+
toggle map
16+
</label>
17+
<MapboxMap
18+
v-if="showMap"
19+
style="height: 60vh"
20+
:access-token="config.public.accessToken"
21+
map-style="mapbox://styles/mapbox/streets-v11">
22+
<MapboxGeocoder />
23+
</MapboxMap>
24+
</div>
25+
</template>

packages/demo/pages/issue-77.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import { MapboxMap, MapboxGeolocateControl } from '@studiometa/vue-mapbox-gl';
44
import 'mapbox-gl/dist/mapbox-gl.css';
55
6-
const { accessToken } = useRuntimeConfig();
6+
const {
7+
public: { accessToken },
8+
} = useRuntimeConfig();
79
810
const geolocate = ref();
911
const control = computed(() => geolocate.value?.control);

packages/docs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "@studiometa/vue-mapbox-gl-docs",
33
"private": true,
44
"type": "module",
5-
"version": "2.7.1",
5+
"version": "2.7.2",
66
"scripts": {
77
"dev": "vitepress",
88
"build": "vitepress build"
99
},
1010
"devDependencies": {
11-
"sass": "1.83.4",
11+
"sass": "1.84.0",
1212
"tailwindcss": "3.4.17",
1313
"vitepress": "1.6.3"
1414
}

packages/tests/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-tests",
3-
"version": "2.7.1",
3+
"version": "2.7.2",
44
"type": "module",
55
"scripts": {
66
"test": "vitest"

packages/vue-mapbox-gl/composables/useControl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function useControl(ControlConstructor, { propsConfig, props, emit, event
6262
});
6363

6464
onUnmounted(() => {
65-
if (unref(control) && unref(map)) {
65+
if (unref(control) && unref(map) && unref(map).hasControl(unref(control))) {
6666
unref(map).removeControl(unref(control));
6767
}
6868
});

packages/vue-mapbox-gl/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl",
3-
"version": "2.7.1",
3+
"version": "2.7.2",
44
"description": "A small components library to use Mapbox GL in Vue 3.",
55
"homepage": "https://github.com/studiometa/vue-mapbox-gl#readme",
66
"bugs": {

0 commit comments

Comments
 (0)