diff --git a/docs/examples/popup.vue b/docs/examples/popup.vue
index c722616..1a2d959 100644
--- a/docs/examples/popup.vue
+++ b/docs/examples/popup.vue
@@ -10,9 +10,10 @@
>
-
+
Hello
HTML content
+ Close popup
@@ -25,11 +26,18 @@ import {
MglMarker,
MglPopup,
} from '@indoorequal/vue-maplibre-gl';
+import { useTemplateRef } from 'vue'
const style = 'https://api.maptiler.com/maps/streets/style.json?key=cQX2iET1gmOW38bedbUh';
const center = [12.550343, 55.665957];
const zoom = 8;
const coordinates = [12.550343, 55.665957];
+
+const popupRef = useTemplateRef('popup')
+const closePopup = () => {
+ popupRef.value.remove()
+};
+