Skip to content

Commit 458d7cc

Browse files
authored
fix(googleMaps): region, language and version be own props (#433)
1 parent f7be4cc commit 458d7cc

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/runtime/components/ScriptGoogleMaps.vue

+15-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ const props = withDefaults(defineProps<{
6262
* Options for the map.
6363
*/
6464
mapOptions?: google.maps.MapOptions
65+
/**
66+
* Defines the region of the map.
67+
*/
68+
region?: string
69+
/**
70+
* Defines the language of the map
71+
*/
72+
language?: string
73+
/**
74+
* Defines the version of google maps js API
75+
*/
76+
version?: string
6577
/**
6678
* Defines the width of the map.
6779
*/
@@ -121,7 +133,9 @@ const { load, status, onLoaded } = useScriptGoogleMaps({
121133
scriptOptions: {
122134
trigger,
123135
},
124-
...props.mapOptions,
136+
region: props.region,
137+
language: props.language,
138+
v: props.version,
125139
})
126140
127141
const options = computed(() => {

0 commit comments

Comments
 (0)