You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/scripts/google-maps/2.api/1.script-google-maps.md
+3-26Lines changed: 3 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,40 +4,17 @@ title: <ScriptGoogleMaps>
4
4
5
5
The [`<ScriptGoogleMaps>`{lang="html"}](/scripts/google-maps){lang="html"} component is a wrapper around the [`useScriptGoogleMaps()`{lang="ts"}](/scripts/google-maps/api/use-script-google-maps){lang="ts"} composable. It provides a simple way to embed Google Maps in your Nuxt app.
It's optimized for performance by using the [Element Event Triggers](/docs/guides/script-triggers#element-event-triggers), only loading the Google Maps when specific elements events happen.
8
11
9
12
Before Google Maps loads, it shows a placeholder using [Maps Static API](https://developers.google.com/maps/documentation/maps-static).
10
13
11
14
By default, it will load on the `mouseenter`, `mouseover`, and `mousedown` events.
12
15
13
-
## Key Props
14
-
15
-
| Prop | Type | Default | Description |
16
-
|---|---|---|---|
17
-
|`apiKey`|`string`| - | Google Maps API key |
18
-
|`center`|`LatLngLiteral \| LatLng \| string`| - | Map center (coordinates or query string) |
19
-
|`zoom`|`number`|`15`| Map zoom level (0-21). Reactive, takes precedence over `mapOptions.zoom`|
20
-
|`mapOptions`|`google.maps.MapOptions`| - | Full map configuration |
21
-
|`markers`|`(string \| AdvancedMarkerElementOptions)[]`| - | Quick markers (use SFC components for full control) |
22
-
|`trigger`|`ElementScriptTrigger`|`['mouseenter', 'mouseover', 'mousedown']`| When to load the Google Maps script |
0 commit comments