From 45e6f248d6470ebb23aca992ee33e356513aab2a Mon Sep 17 00:00:00 2001 From: harlan Date: Thu, 22 Aug 2024 18:49:42 +1000 Subject: [PATCH] fix(GoogleMaps): ensure center marker is place when using mapOptions --- playground/pages/third-parties/google-maps/markers.vue | 1 - src/runtime/components/ScriptGoogleMaps.vue | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/playground/pages/third-parties/google-maps/markers.vue b/playground/pages/third-parties/google-maps/markers.vue index 994c6473..950b9210 100644 --- a/playground/pages/third-parties/google-maps/markers.vue +++ b/playground/pages/third-parties/google-maps/markers.vue @@ -38,7 +38,6 @@ function removeMarkers() { :map-options="mapOptions" :markers="markers" above-the-fold - @init="setupGoogleMaps" />
diff --git a/src/runtime/components/ScriptGoogleMaps.vue b/src/runtime/components/ScriptGoogleMaps.vue index cc5845fc..f0c5b61b 100644 --- a/src/runtime/components/ScriptGoogleMaps.vue +++ b/src/runtime/components/ScriptGoogleMaps.vue @@ -240,7 +240,7 @@ onMounted(() => { watch(options, () => { map.value?.setOptions(options.value) }) - watch([() => props.markers, map], () => { + watch([() => props.markers, map], async () => { if (!map.value) { return }