Skip to content

Commit ca99693

Browse files
committed
fix(google-maps): default mapId fallback to DEMO_MAP_ID
Google's pre-registered dev map ID. An arbitrary string like 'map' triggers a console warning every load; DEMO_MAP_ID renders silently and matches Google's documented convention for examples.
1 parent dfba95e commit ca99693

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/script/src/runtime/components/GoogleMaps/ScriptGoogleMaps.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const options = computed(() => {
227227
// sets `styles`, we drop `mapId` so styles apply. Otherwise fall back to a map ID
228228
// so `AdvancedMarkerElement` can function. The marker component warns if markers
229229
// are mounted against a styled (mapId-less) map.
230-
const mapId = props.mapOptions?.styles ? undefined : (currentMapId.value || 'map')
230+
const mapId = props.mapOptions?.styles ? undefined : (currentMapId.value || 'DEMO_MAP_ID')
231231
return defu(
232232
{ center: centerOverride.value, mapId },
233233
props.mapOptions,

0 commit comments

Comments
 (0)