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
@@ -98,39 +98,198 @@ Component to wrap around the code where the map should be available.
98
98
99
99
### Properties
100
100
101
+
Properties that can be passed to the `GoogleMapsProvider` that are either the container to hold the map instance or [Maps JavaScript API URL Parameters](https://developers.google.com/maps/documentation/javascript/url-params).
102
+
101
103
```TypeScript
102
104
interfaceGoogleMapProviderProps {
103
-
children:React.ReactElement;
105
+
googleMapsAPIKey:string;
106
+
mapContainer?:HTMLElement|null;
107
+
options?:google.maps.MapOptions;
108
+
libraries?:string[];
109
+
language?:string;
110
+
region?:string;
111
+
version?:string;
112
+
authReferrerPolicy?:string;
113
+
onLoad?: (map:google.maps.Map) =>void;
114
+
}
115
+
```
116
+
- - - -
117
+
__googleMapsAPIKey__ (_compulsary property_)
104
118
105
-
// The Google Maps API Key
119
+
The Google Maps JavaScript API Key.
120
+
```Typescript
106
121
googleMapsAPIKey: string;
122
+
```
107
123
108
-
// A reference to the component that displays the map
109
-
mapContainer?:HTMLElement|null;
124
+
See: [Use API Key](https://developers.google.com/maps/documentation/embed/get-api-key)
110
125
111
-
// The Google Maps MapOptions, see: https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions
112
-
options?:google.maps.MapOptions;
126
+
- - - -
113
127
114
-
// Additional Google Maps libraries to load ('drawing', 'geometry', 'places' or 'visualization'), see: https://developers.google.com/maps/documentation/javascript/libraries
115
-
libraries?:string[];
128
+
__mapContainer__ (_optional property_)
116
129
117
-
// By default Google Maps will use the preferred language from the browser setting. This is the property to set it manually, see: https://developers.google.com/maps/documentation/javascript/localization
118
-
language?:string;
130
+
A reference to the HTML element that displays the map.
131
+
Without the mapContainer provided, no visual map will be displayed.
119
132
120
-
// By default Google Maps will use the preferred region from the browser setting. This is the property to set it manually, see: https://developers.google.com/maps/documentation/javascript/localization
121
-
region?:string;
133
+
```Typescript
134
+
mapContainer?:HTMLElement|null;
135
+
```
122
136
123
-
// Use this parameter to specify a version, see: https://developers.google.com/maps/documentation/javascript/versions
124
-
version?:string;
137
+
_Example:_
125
138
126
-
// Use this parameter to set auth_referrer_policy=origin when an URL on the same origin uses the API Key, to limit the amount of data sent when authorizing requests, see "auth_referrer_policy": https://developers.google.com/maps/documentation/javascript/url-params
127
-
authReferrerPolicy?:string;
139
+
The mapContainer will be passed to the `mapProvider` and `mapCanvas component` in the following way:
128
140
129
-
// A callback function that is called, when the map is loaded.
Use this parameter to set auth_referrer_policy=origin when an URL on the same origin uses the API Key, to limit the amount of data sent when authorizing requests.
0 commit comments