1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310# @capacitor/google-maps
Google maps on Capacitor
## Install
```bash
npm install @capacitor/google-maps
npx cap sync
```
## API Keys
To use the Google Maps SDK on any platform, API keys associated with an account _with billing enabled_ are required. These can be obtained from the [Google Cloud Console](https://console.cloud.google.com). This is required for all three platforms, Android, iOS, and Javascript. Additional information about obtaining these API keys can be found in the [Google Maps documentation](https://developers.google.com/maps/documentation/android-sdk/overview) for each platform.
## iOS
The Google Maps SDK supports the use of showing the users current location via `enableCurrentLocation(bool)`. To use this, Apple requires privacy descriptions to be specified in `Info.plist`:
- `NSLocationWhenInUseUsageDescription` (`Privacy - Location When In Use Usage Description`)
Read about [Configuring `Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) in the [iOS Guide](https://capacitorjs.com/docs/ios) for more information on setting iOS permissions in Xcode.
### Typescript Configuration
Your project will also need have `skipLibCheck` set to `true` in `tsconfig.json`.
### Migrating from older versions
> The main Google Maps SDK now supports running on simulators on Apple Silicon Macs, but make sure you have the latest version of [Google-Maps-iOS-Utils](https://github.com/googlemaps/google-maps-ios-utils) installed.
If you added the previous workaround for getting the unreleased version, you can delete it now by removing this line from `ios/App/Podfile`:
```
pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/googlemaps/google-maps-ios-utils.git', :commit => '637954e5bcb2a879c11a6f2cead153a6bad5339f'
```
Then run `pod update Google-Maps-iOS-Utils` from the `ios/App/` folder:
```
cd ios/App
pod update Google-Maps-iOS-Utils
```
## Android
The Google Maps SDK for Android requires you to add your API key to the AndroidManifest.xml file in your project.
```xml
<meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_API_KEY_HERE"/>
```
To use certain location features, the SDK requires the following permissions to also be added to your AndroidManifest.xml:
```xml
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
```
### Variables
This plugin will use the following project variables (defined in your app's `variables.gradle` file):
- `googleMapsPlayServicesVersion`: version of `com.google.android.gms:play-services-maps` (default: `19.2.0`)
- `googleMapsUtilsVersion`: version of `com.google.maps.android:android-maps-utils` (default: `3.19.1`)
- `googleMapsKtxVersion`: version of `com.google.maps.android:maps-ktx` (default: `5.2.1`)
- `googleMapsUtilsKtxVersion`: version of `com.google.maps.android:maps-utils-ktx` (default: `5.2.1`)
- `kotlinxCoroutinesVersion`: version of `org.jetbrains.kotlinx:kotlinx-coroutines-android` and `org.jetbrains.kotlinx:kotlinx-coroutines-core` (default: `1.10.2`)
- `androidxCoreKTXVersion`: version of `androidx.core:core-ktx` (default: `1.17.0`)
- `kotlin_version`: version of `org.jetbrains.kotlin:kotlin-stdlib` (default: `2.2.20`)
## Usage
The Google Maps Capacitor plugin ships with a web component that must be used to render the map in your application as it enables us to embed the native view more effectively on iOS. The plugin will automatically register this web component for use in your application.
> For Angular users, you will get an error warning that this web component is unknown to the Angular compiler. This is resolved by modifying the module that declares your component to allow for custom web components.
>
> ```typescript
> import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
>
> @NgModule({
> schemas: [CUSTOM_ELEMENTS_SCHEMA]
> })
> ```
Include this component in your HTML and assign it an ID so that you can easily query for that element reference later.
```html
<capacitor-google-map id="map"></capacitor-google-map>
```
> On Android, the map is rendered beneath the entire webview, and uses this component to manage its positioning during scrolling events. This means that as the developer, you _must_ ensure that the webview is transparent all the way through the layers to the very bottom. In a typically Ionic application, that means setting transparency on elements such as IonContent and the root HTML tag to ensure that it can be seen. If you can't see your map on Android, this should be the first thing you check.
>
> On iOS, we render the map directly into the webview and so the same transparency effects are not required. We are investigating alternate methods for Android still and hope to resolve this better in a future update.
The Google Map element itself comes unstyled, so you should style it to fit within the layout of your page structure. Because we're rendering a view into this slot, by itself the element has no width or height, so be sure to set those explicitly.
```css
capacitor-google-map {
display: inline-block;
width: 275px;
height: 400px;
}
```
Next, we should create the map reference. This is done by importing the GoogleMap class from the Capacitor plugin and calling the create method, and passing in the required parameters.
```typescript
import { GoogleMap } from '@capacitor/google-maps';
const apiKey = 'YOUR_API_KEY_HERE';
const mapRef = document.getElementById('map');
const newMap = await GoogleMap.create({
id: 'my-map', // Unique identifier for this map instance
element: mapRef, // reference to the capacitor-google-map element
apiKey: apiKey, // Your Google Maps API Key
config: {
center: {
// The initial position to be rendered by the map
lat: 33.6,
lng: -117.9,
},
zoom: 8, // The initial zoom level to be rendered by the map
},
});
```
At this point, your map should be created within your application. Using the returned reference to the map, you can easily interact with your map in a number of way, a few of which are shown here.
```typescript
const newMap = await GoogleMap.create({...});
// Add a marker to the map
const markerId = await newMap.addMarker({
coordinate: {
lat: 33.6,
lng: -117.9
}
});
// Move the map programmatically
await newMap.setCamera({
coordinate: {
lat: 33.6,
lng: -117.9
}
});
// Enable marker clustering
await newMap.enableClustering();
// Handle marker click
await newMap.setOnMarkerClickListener((event) => {...});
// Clean up map reference
await newMap.destroy();
```
## Full Examples
### Angular
```typescript
import { GoogleMap } from '@capacitor/google-maps';
@Component({
template: `
<capacitor-google-map #map></capacitor-google-map>
<button (click)="createMap()">Create Map</button>
`,
styles: [
`
capacitor-google-map {
display: inline-block;
width: 275px;
height: 400px;
}
`,
],
})
export class MyMap {
@ViewChild('map')
mapRef: ElementRef<HTMLElement>;
newMap: GoogleMap;
async createMap() {
this.newMap = await GoogleMap.create({
id: 'my-cool-map',
element: this.mapRef.nativeElement,
apiKey: environment.apiKey,
config: {
center: {
lat: 33.6,
lng: -117.9,
},
zoom: 8,
},
});
}
}
```
### React
```jsx
import { GoogleMap } from '@capacitor/google-maps';
import { useRef } from 'react';
const MyMap: React.FC = () => {
const mapRef = useRef<HTMLElement>();
let newMap: GoogleMap;
async function createMap() {
if (!mapRef.current) return;
newMap = await GoogleMap.create({
id: 'my-cool-map',
element: mapRef.current,
apiKey: process.env.REACT_APP_YOUR_API_KEY_HERE,
config: {
center: {
lat: 33.6,
lng: -117.9
},
zoom: 8
}
})
}
return (
<div className="component-wrapper">
<capacitor-google-map ref={mapRef} style={{
display: 'inline-block',
width: 275,
height: 400
}}></capacitor-google-map>
<button onClick={createMap}>Create Map</button>
</div>
)
}
export default MyMap;
```
You may need to create a `*.d.ts` file for the custom element in React:
```ts
// custom-elements.d.ts
declare module "react" {
namespace JSX {
interface IntrinsicElements {
"capacitor-google-map": React.DetailedHTMLProps<
React.HTMLAttributes<HTMLElement>,
HTMLElement
>;
}
}
}
export {};
```
### Vue
```vue
<script lang="ts" setup>
import { ref, shallowRef, useTemplateRef } from 'vue'
import { GoogleMap } from '@capacitor/google-maps'
const mapRef = useTemplateRef<HTMLElement>('mapRef')
const newMap = shallowRef<GoogleMap>()
async function createMap() {
if (!mapRef.value) return
newMap.value = await GoogleMap.create({
id: 'my-cool-map',
element: mapRef.value,
apiKey: import.meta.env.VITE_YOUR_API_KEY_HERE,
config: {
center: {
lat: 33.6,
lng: -117.9,
},
zoom: 8,
},
})
}
</script>
<template>
<capacitor-google-map
ref="mapRef"
style="display: inline-block; width: 275px; height: 400px"
></capacitor-google-map>
<button @click="createMap()">Create Map</button>
</template>
```
make sure you need enable [recognize native custom elements](https://vuejs.org/guide/extras/web-components.html#using-custom-elements-in-vue) like
```ts
// vite.config.mts > plugins
Vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith('capacitor-')
},
},
}),
```
### Javascript
```html
<capacitor-google-map id="map"></capacitor-google-map>
<button onclick="createMap()">Create Map</button>
<style>
capacitor-google-map {
display: inline-block;
width: 275px;
height: 400px;
}
</style>
<script>
import { GoogleMap } from '@capacitor/google-maps';
const createMap = async () => {
const mapRef = document.getElementById('map');
const newMap = await GoogleMap.create({
id: 'my-map', // Unique identifier for this map instance
element: mapRef, // reference to the capacitor-google-map element
apiKey: 'YOUR_API_KEY_HERE', // Your Google Maps API Key
config: {
center: {
// The initial position to be rendered by the map
lat: 33.6,
lng: -117.9,
},
zoom: 8, // The initial zoom level to be rendered by the map
},
});
};
</script>
```
## API
<docgen-index>
* [`create(...)`](#create)
* [`enableTouch()`](#enabletouch)
* [`disableTouch()`](#disabletouch)
* [`enableClustering(...)`](#enableclustering)
* [`disableClustering()`](#disableclustering)
* [`addTileOverlay(...)`](#addtileoverlay)
* [`removeTileOverlay(...)`](#removetileoverlay)
* [`addMarker(...)`](#addmarker)
* [`addMarkers(...)`](#addmarkers)
* [`removeMarker(...)`](#removemarker)
* [`removeMarkers(...)`](#removemarkers)
* [`addPolygons(...)`](#addpolygons)
* [`removePolygons(...)`](#removepolygons)
* [`addCircles(...)`](#addcircles)
* [`removeCircles(...)`](#removecircles)
* [`addPolylines(...)`](#addpolylines)
* [`removePolylines(...)`](#removepolylines)
* [`destroy()`](#destroy)
* [`setCamera(...)`](#setcamera)
* [`getMapType()`](#getmaptype)
* [`setMapType(...)`](#setmaptype)
* [`enableIndoorMaps(...)`](#enableindoormaps)
* [`enableTrafficLayer(...)`](#enabletrafficlayer)
* [`enableAccessibilityElements(...)`](#enableaccessibilityelements)
* [`enableCurrentLocation(...)`](#enablecurrentlocation)
* [`setPadding(...)`](#setpadding)
* [`getMapBounds()`](#getmapbounds)
* [`fitBounds(...)`](#fitbounds)
* [`setOnBoundsChangedListener(...)`](#setonboundschangedlistener)
* [`setOnCameraIdleListener(...)`](#setoncameraidlelistener)
* [`setOnCameraMoveStartedListener(...)`](#setoncameramovestartedlistener)
* [`setOnClusterClickListener(...)`](#setonclusterclicklistener)
* [`setOnClusterInfoWindowClickListener(...)`](#setonclusterinfowindowclicklistener)
* [`setOnInfoWindowClickListener(...)`](#setoninfowindowclicklistener)
* [`setOnMapClickListener(...)`](#setonmapclicklistener)
* [`setOnMarkerClickListener(...)`](#setonmarkerclicklistener)
* [`setOnPolygonClickListener(...)`](#setonpolygonclicklistener)
* [`setOnCircleClickListener(...)`](#setoncircleclicklistener)
* [`setOnPolylineClickListener(...)`](#setonpolylineclicklistener)
* [`setOnMarkerDragStartListener(...)`](#setonmarkerdragstartlistener)
* [`setOnMarkerDragListener(...)`](#setonmarkerdraglistener)
* [`setOnMarkerDragEndListener(...)`](#setonmarkerdragendlistener)
* [`setOnMyLocationButtonClickListener(...)`](#setonmylocationbuttonclicklistener)
* [`setOnMyLocationClickListener(...)`](#setonmylocationclicklistener)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
* [Enums](#enums)
</docgen-index>
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
### create(...)
```typescript
create(options: CreateMapArgs, callback?: MapListenerCallback<MapReadyCallbackData> | undefined) => Promise<GoogleMap>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#createmapargs">CreateMapArgs</a></code> |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#mapreadycallbackdata">MapReadyCallbackData</a>></code> |
**Returns:** <code>Promise<GoogleMap></code>
--------------------
### enableTouch()
```typescript
enableTouch() => Promise<void>
```
--------------------
### disableTouch()
```typescript
disableTouch() => Promise<void>
```
--------------------
### enableClustering(...)
```typescript
enableClustering(minClusterSize?: number | undefined) => Promise<void>
```
| Param | Type | Description |
| -------------------- | ------------------- | --------------------------------------------------------------------------------------- |
| **`minClusterSize`** | <code>number</code> | The minimum number of markers that can be clustered together. The default is 4 markers. |
--------------------
### disableClustering()
```typescript
disableClustering() => Promise<void>
```
--------------------
### addTileOverlay(...)
```typescript
addTileOverlay(tileOverlay: TileOverlay) => Promise<{ id: string; }>
```
| Param | Type |
| ----------------- | --------------------------------------------------- |
| **`tileOverlay`** | <code><a href="#tileoverlay">TileOverlay</a></code> |
**Returns:** <code>Promise<{ id: string; }></code>
--------------------
### removeTileOverlay(...)
```typescript
removeTileOverlay(id: string) => Promise<void>
```
| Param | Type |
| -------- | ------------------- |
| **`id`** | <code>string</code> |
--------------------
### addMarker(...)
```typescript
addMarker(marker: Marker) => Promise<string>
```
| Param | Type |
| ------------ | ----------------------------------------- |
| **`marker`** | <code><a href="#marker">Marker</a></code> |
**Returns:** <code>Promise<string></code>
--------------------
### addMarkers(...)
```typescript
addMarkers(markers: Marker[]) => Promise<string[]>
```
| Param | Type |
| ------------- | --------------------- |
| **`markers`** | <code>Marker[]</code> |
**Returns:** <code>Promise<string[]></code>
--------------------
### removeMarker(...)
```typescript
removeMarker(id: string) => Promise<void>
```
| Param | Type |
| -------- | ------------------- |
| **`id`** | <code>string</code> |
--------------------
### removeMarkers(...)
```typescript
removeMarkers(ids: string[]) => Promise<void>
```
| Param | Type |
| --------- | --------------------- |
| **`ids`** | <code>string[]</code> |
--------------------
### addPolygons(...)
```typescript
addPolygons(polygons: Polygon[]) => Promise<string[]>
```
| Param | Type |
| -------------- | ---------------------- |
| **`polygons`** | <code>Polygon[]</code> |
**Returns:** <code>Promise<string[]></code>
--------------------
### removePolygons(...)
```typescript
removePolygons(ids: string[]) => Promise<void>
```
| Param | Type |
| --------- | --------------------- |
| **`ids`** | <code>string[]</code> |
--------------------
### addCircles(...)
```typescript
addCircles(circles: Circle[]) => Promise<string[]>
```
| Param | Type |
| ------------- | --------------------- |
| **`circles`** | <code>Circle[]</code> |
**Returns:** <code>Promise<string[]></code>
--------------------
### removeCircles(...)
```typescript
removeCircles(ids: string[]) => Promise<void>
```
| Param | Type |
| --------- | --------------------- |
| **`ids`** | <code>string[]</code> |
--------------------
### addPolylines(...)
```typescript
addPolylines(polylines: Polyline[]) => Promise<string[]>
```
| Param | Type |
| --------------- | ----------------------- |
| **`polylines`** | <code>Polyline[]</code> |
**Returns:** <code>Promise<string[]></code>
--------------------
### removePolylines(...)
```typescript
removePolylines(ids: string[]) => Promise<void>
```
| Param | Type |
| --------- | --------------------- |
| **`ids`** | <code>string[]</code> |
--------------------
### destroy()
```typescript
destroy() => Promise<void>
```
--------------------
### setCamera(...)
```typescript
setCamera(config: CameraConfig) => Promise<void>
```
| Param | Type |
| ------------ | ----------------------------------------------------- |
| **`config`** | <code><a href="#cameraconfig">CameraConfig</a></code> |
--------------------
### getMapType()
```typescript
getMapType() => Promise<MapType>
```
Get current map type
**Returns:** <code>Promise<<a href="#maptype">MapType</a>></code>
--------------------
### setMapType(...)
```typescript
setMapType(mapType: MapType) => Promise<void>
```
| Param | Type |
| ------------- | ------------------------------------------- |
| **`mapType`** | <code><a href="#maptype">MapType</a></code> |
--------------------
### enableIndoorMaps(...)
```typescript
enableIndoorMaps(enabled: boolean) => Promise<void>
```
| Param | Type |
| ------------- | -------------------- |
| **`enabled`** | <code>boolean</code> |
--------------------
### enableTrafficLayer(...)
```typescript
enableTrafficLayer(enabled: boolean) => Promise<void>
```
| Param | Type |
| ------------- | -------------------- |
| **`enabled`** | <code>boolean</code> |
--------------------
### enableAccessibilityElements(...)
```typescript
enableAccessibilityElements(enabled: boolean) => Promise<void>
```
| Param | Type |
| ------------- | -------------------- |
| **`enabled`** | <code>boolean</code> |
--------------------
### enableCurrentLocation(...)
```typescript
enableCurrentLocation(enabled: boolean) => Promise<void>
```
| Param | Type |
| ------------- | -------------------- |
| **`enabled`** | <code>boolean</code> |
--------------------
### setPadding(...)
```typescript
setPadding(padding: MapPadding) => Promise<void>
```
| Param | Type |
| ------------- | ------------------------------------------------- |
| **`padding`** | <code><a href="#mappadding">MapPadding</a></code> |
--------------------
### getMapBounds()
```typescript
getMapBounds() => Promise<LatLngBounds>
```
Get the map's current viewport latitude and longitude bounds.
**Returns:** <code>Promise<LatLngBounds></code>
--------------------
### fitBounds(...)
```typescript
fitBounds(bounds: LatLngBounds, padding?: number | undefined) => Promise<void>
```
Sets the map viewport to contain the given bounds.
| Param | Type | Description |
| ------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **`bounds`** | <code>LatLngBounds</code> | The bounds to fit in the viewport. |
| **`padding`** | <code>number</code> | Optional padding to apply in pixels. The bounds will be fit in the part of the map that remains after padding is removed. |
--------------------
### setOnBoundsChangedListener(...)
```typescript
setOnBoundsChangedListener(callback?: MapListenerCallback<CameraIdleCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#cameraidlecallbackdata">CameraIdleCallbackData</a>></code> |
--------------------
### setOnCameraIdleListener(...)
```typescript
setOnCameraIdleListener(callback?: MapListenerCallback<CameraIdleCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#cameraidlecallbackdata">CameraIdleCallbackData</a>></code> |
--------------------
### setOnCameraMoveStartedListener(...)
```typescript
setOnCameraMoveStartedListener(callback?: MapListenerCallback<CameraMoveStartedCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#cameramovestartedcallbackdata">CameraMoveStartedCallbackData</a>></code> |
--------------------
### setOnClusterClickListener(...)
```typescript
setOnClusterClickListener(callback?: MapListenerCallback<ClusterClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#clusterclickcallbackdata">ClusterClickCallbackData</a>></code> |
--------------------
### setOnClusterInfoWindowClickListener(...)
```typescript
setOnClusterInfoWindowClickListener(callback?: MapListenerCallback<ClusterClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#clusterclickcallbackdata">ClusterClickCallbackData</a>></code> |
--------------------
### setOnInfoWindowClickListener(...)
```typescript
setOnInfoWindowClickListener(callback?: MapListenerCallback<MarkerClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#markerclickcallbackdata">MarkerClickCallbackData</a>></code> |
--------------------
### setOnMapClickListener(...)
```typescript
setOnMapClickListener(callback?: MapListenerCallback<MapClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#mapclickcallbackdata">MapClickCallbackData</a>></code> |
--------------------
### setOnMarkerClickListener(...)
```typescript
setOnMarkerClickListener(callback?: MapListenerCallback<MarkerClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#markerclickcallbackdata">MarkerClickCallbackData</a>></code> |
--------------------
### setOnPolygonClickListener(...)
```typescript
setOnPolygonClickListener(callback?: MapListenerCallback<PolygonClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#polygonclickcallbackdata">PolygonClickCallbackData</a>></code> |
--------------------
### setOnCircleClickListener(...)
```typescript
setOnCircleClickListener(callback?: MapListenerCallback<CircleClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#circleclickcallbackdata">CircleClickCallbackData</a>></code> |
--------------------
### setOnPolylineClickListener(...)
```typescript
setOnPolylineClickListener(callback?: MapListenerCallback<PolylineCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#polylinecallbackdata">PolylineCallbackData</a>></code> |
--------------------
### setOnMarkerDragStartListener(...)
```typescript
setOnMarkerDragStartListener(callback?: MapListenerCallback<MarkerClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#markerclickcallbackdata">MarkerClickCallbackData</a>></code> |
--------------------
### setOnMarkerDragListener(...)
```typescript
setOnMarkerDragListener(callback?: MapListenerCallback<MarkerClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#markerclickcallbackdata">MarkerClickCallbackData</a>></code> |
--------------------
### setOnMarkerDragEndListener(...)
```typescript
setOnMarkerDragEndListener(callback?: MapListenerCallback<MarkerClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#markerclickcallbackdata">MarkerClickCallbackData</a>></code> |
--------------------
### setOnMyLocationButtonClickListener(...)
```typescript
setOnMyLocationButtonClickListener(callback?: MapListenerCallback<MyLocationButtonClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#mylocationbuttonclickcallbackdata">MyLocationButtonClickCallbackData</a>></code> |
--------------------
### setOnMyLocationClickListener(...)
```typescript
setOnMyLocationClickListener(callback?: MapListenerCallback<MapClickCallbackData> | undefined) => Promise<void>
```
| Param | Type |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **`callback`** | <code><a href="#maplistenercallback">MapListenerCallback</a><<a href="#mapclickcallbackdata">MapClickCallbackData</a>></code> |
--------------------
### Interfaces
#### CreateMapArgs
An interface containing the options used when creating a map.
| Prop | Type | Description | Default |
| ----------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| **`id`** | <code>string</code> | A unique identifier for the map instance. | |
| **`apiKey`** | <code>string</code> | The Google Maps SDK API Key. | |
| **`config`** | <code><a href="#googlemapconfig">GoogleMapConfig</a></code> | The initial configuration settings for the map. | |
| **`element`** | <code>HTMLElement</code> | The DOM element that the Google Map View will be mounted on which determines size and positioning. | |
| **`forceCreate`** | <code>boolean</code> | Destroy and re-create the map instance if a map with the supplied id already exists | <code>false</code> |
| **`region`** | <code>string</code> | The region parameter alters your application to serve different map tiles or bias the application (such as biasing geocoding results towards the region). Only available for web. | |
| **`language`** | <code>string</code> | The language parameter affects the names of controls, copyright notices, driving directions, and control labels, as well as the responses to service requests. Only available for web. | |
#### GoogleMapConfig
For web, all the javascript Google Maps options are available as
GoogleMapConfig extends google.maps.MapOptions.
For iOS and Android only the config options declared on <a href="#googlemapconfig">GoogleMapConfig</a> are available.
| Prop | Type | Description | Default | Since |
| ---------------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
| **`width`** | <code>number</code> | Override width for native map. | | |
| **`height`** | <code>number</code> | Override height for native map. | | |
| **`x`** | <code>number</code> | Override absolute x coordinate position for native map. | | |
| **`y`** | <code>number</code> | Override absolute y coordinate position for native map. | | |
| **`center`** | <code><a href="#latlng">LatLng</a></code> | Default location on the Earth towards which the camera points. | | |
| **`zoom`** | <code>number</code> | Sets the zoom of the map. | | |
| **`androidLiteMode`** | <code>boolean</code> | Enables image-based lite mode on Android. | <code>false</code> | |
| **`devicePixelRatio`** | <code>number</code> | Override pixel ratio for native map. | | |
| **`styles`** | <code>MapTypeStyle[] \| null</code> | Styles to apply to each of the default map types. Note that for satellite, hybrid and terrain modes, these styles will only apply to labels and geometry. | | 4.3.0 |
| **`mapId`** | <code>string</code> | A map id associated with a specific map style or feature. [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id) Only for Web. | | 5.4.0 |
| **`androidMapId`** | <code>string</code> | A map id associated with a specific map style or feature. [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id) Only for Android. | | 5.4.0 |
| **`iOSMapId`** | <code>string</code> | A map id associated with a specific map style or feature. [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id) Only for iOS. | | 5.4.0 |
| **`maxZoom`** | <code>number \| null</code> | The maximum zoom level which will be displayed on the map. If omitted, or set to <code>null</code>, the maximum zoom from the current map type is used instead. Valid zoom values are numbers from zero up to the supported <a href="https://developers.google.com/maps/documentation/javascript/maxzoom">maximum zoom level</a>. | | |
| **`minZoom`** | <code>number \| null</code> | The minimum zoom level which will be displayed on the map. If omitted, or set to <code>null</code>, the minimum zoom from the current map type is used instead. Valid zoom values are numbers from zero up to the supported <a href="https://developers.google.com/maps/documentation/javascript/maxzoom">maximum zoom level</a>. | | |
| **`mapTypeId`** | <code>string \| null</code> | The initial Map mapTypeId. Defaults to <code>ROADMAP</code>. | | |
| **`heading`** | <code>number \| null</code> | The heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are snapped to the nearest available angle for which imagery is available. | | |
| **`restriction`** | <code>MapRestriction \| null</code> | Defines a boundary that restricts the area of the map accessible to users. When set, a user can only pan and zoom while the camera view stays inside the limits of the boundary. | | |
#### LatLng
An interface representing a pair of latitude and longitude coordinates.
| Prop | Type | Description |
| --------- | ------------------- | ------------------------------------------------------------------------- |
| **`lat`** | <code>number</code> | Coordinate latitude, in degrees. This value is in the range [-90, 90]. |
| **`lng`** | <code>number</code> | Coordinate longitude, in degrees. This value is in the range [-180, 180]. |
#### MapReadyCallbackData
| Prop | Type |
| ----------- | ------------------- |
| **`mapId`** | <code>string</code> |
#### TileOverlay
A tile overlay is an image placed on top of your map at a specific zoom level. Available on iOS, Android and Web
| Prop | Type | Description | Default |
| ------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
| **`url`** | <code>string</code> | A string representing the tile url. Should contain `{x}`, `{y}` and `{z}` so they can be replaced with actual values for x, y and zoom. Available on iOS, Android and Web | |
| **`opacity`** | <code>number</code> | The opacity of the tile overlay, between 0 (completely transparent) and 1 inclusive. Available on iOS, Android and Web | <code>undefined</code> |
| **`visible`** | <code>boolean</code> | Controls whether this tile overlay should be visible. Available only on Android | <code>undefined</code> |
| **`zIndex`** | <code>number</code> | The zIndex of the tile overlay. Available on iOS and Android | <code>undefined</code> |
#### Marker
A marker is an icon placed at a particular point on the map's surface.
| Prop | Type | Description | Default | Since |
| ---------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
| **`coordinate`** | <code><a href="#latlng">LatLng</a></code> | <a href="#marker">Marker</a> position | | |
| **`opacity`** | <code>number</code> | Sets the opacity of the marker, between 0 (completely transparent) and 1 inclusive. | <code>1</code> | |
| **`title`** | <code>string</code> | Title, a short description of the overlay. | | |
| **`snippet`** | <code>string</code> | Snippet text, shown beneath the title in the info window when selected. | | |
| **`isFlat`** | <code>boolean</code> | Controls whether this marker should be flat against the Earth's surface or a billboard facing the camera. | <code>false</code> | |
| **`iconUrl`** | <code>string</code> | Path to a marker icon to render. It can be relative to the web app public directory, or a https url of a remote marker icon. **SVGs are not supported on native platforms.** | | 4.2.0 |
| **`iconSize`** | <code><a href="#size">Size</a></code> | Controls the scaled size of the marker image set in `iconUrl`. | | 4.2.0 |
| **`iconOrigin`** | <code><a href="#point">Point</a></code> | The position of the image within a sprite, if any. By default, the origin is located at the top left corner of the image . | | 4.2.0 |
| **`iconAnchor`** | <code><a href="#point">Point</a></code> | The position at which to anchor an image in correspondence to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image. | | 4.2.0 |
| **`tintColor`** | <code>{ r: number; g: number; b: number; a: number; }</code> | Customizes the color of the default marker image. Each value must be between 0 and 255. Only for iOS and Android. | | 4.2.0 |
| **`draggable`** | <code>boolean</code> | Controls whether this marker can be dragged interactively | <code>false</code> | |
| **`zIndex`** | <code>number</code> | Specifies the stack order of this marker, relative to other markers on the map. A marker with a high z-index is drawn on top of markers with lower z-indexes | <code>0</code> | |
#### Size
| Prop | Type |
| ------------ | ------------------- |
| **`width`** | <code>number</code> |
| **`height`** | <code>number</code> |
#### Point
| Prop | Type |
| ------- | ------------------- |
| **`x`** | <code>number</code> |
| **`y`** | <code>number</code> |
#### Polygon
For web, all the javascript <a href="#polygon">Polygon</a> options are available as
Polygon extends google.maps.PolygonOptions.
For iOS and Android only the config options declared on <a href="#polygon">Polygon</a> are available.
| Prop | Type | Description |
| ------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`paths`** | <code>any[] \| MVCArray<any></code> | The ordered sequence of coordinates that designates a closed loop. Unlike polylines, a polygon may consist of one or more paths. As a result, the paths property may specify one or more arrays of <code><a href="#latlng">LatLng</a></code> coordinates. Paths are closed automatically; do not repeat the first vertex of the path as the last vertex. Simple polygons may be defined using a single array of <code><a href="#latlng">LatLng</a></code>s. More complex polygons may specify an array of arrays. Any simple arrays are converted into <code><a href="#MVCArray">MVCArray</a></code>s. Inserting or removing <code><a href="#latlng">LatLng</a></code>s from the <code>MVCArray</code> will automatically update the polygon on the map. |
| **`strokeColor`** | <code>string</code> | The stroke color. All CSS3 colors are supported except for extended named colors. |
| **`strokeOpacity`** | <code>number</code> | The stroke opacity between 0.0 and 1.0 |
| **`strokeWeight`** | <code>number</code> | The stroke width in pixels. |
| **`fillColor`** | <code>string</code> | The fill color. All CSS3 colors are supported except for extended named colors. |
| **`fillOpacity`** | <code>number</code> | The fill opacity between 0.0 and 1.0 |
| **`geodesic`** | <code>boolean</code> | When <code>true</code>, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth. When <code>false</code>, edges of the polygon are rendered as straight lines in screen space. Note that the shape of a geodesic polygon may appear to change when dragged, as the dimensions are maintained relative to the surface of the earth. |
| **`clickable`** | <code>boolean</code> | Indicates whether this <code><a href="#polygon">Polygon</a></code> handles mouse events. |
| **`title`** | <code>string</code> | Title, a short description of the overlay. Some overlays, such as markers, will display the title on the map. The title is also the default accessibility text. Only available on iOS. |
| **`tag`** | <code>string</code> | |
#### Circle
For web, all the javascript <a href="#circle">Circle</a> options are available as
Circle extends google.maps.CircleOptions.
For iOS and Android only the config options declared on <a href="#circle">Circle</a> are available.
| Prop | Type | Description |
| ------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`fillColor`** | <code>string</code> | The fill color. All CSS3 colors are supported except for extended named colors. |
| **`fillOpacity`** | <code>number</code> | The fill opacity between 0.0 and 1.0. |
| **`strokeColor`** | <code>string</code> | The stroke color. All CSS3 colors are supported except for extended named colors. |
| **`strokeWeight`** | <code>number</code> | The stroke width in pixels. |
| **`geodesic`** | <code>boolean</code> | |
| **`clickable`** | <code>boolean</code> | Indicates whether this <code><a href="#circle">Circle</a></code> handles mouse events. |
| **`title`** | <code>string</code> | Title, a short description of the overlay. Some overlays, such as markers, will display the title on the map. The title is also the default accessibility text. Only available on iOS. |
| **`tag`** | <code>string</code> | |
#### Polyline
For web, all the javascript <a href="#polyline">Polyline</a> options are available as
Polyline extends google.maps.PolylineOptions.
For iOS and Android only the config options declared on <a href="#polyline">Polyline</a> are available.
| Prop | Type | Description |
| ------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`strokeColor`** | <code>string</code> | The stroke color. All CSS3 colors are supported except for extended named colors. |
| **`strokeOpacity`** | <code>number</code> | The stroke opacity between 0.0 and 1.0. |
| **`strokeWeight`** | <code>number</code> | The stroke width in pixels. |
| **`geodesic`** | <code>boolean</code> | When <code>true</code>, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth. When <code>false</code>, edges of the polygon are rendered as straight lines in screen space. Note that the shape of a geodesic polygon may appear to change when dragged, as the dimensions are maintained relative to the surface of the earth. |
| **`clickable`** | <code>boolean</code> | Indicates whether this <code><a href="#polyline">Polyline</a></code> handles mouse events. |
| **`tag`** | <code>string</code> | |
| **`styleSpans`** | <code>StyleSpan[]</code> | Used to specify the color of one or more segments of a polyline. The styleSpans property is an array of <a href="#stylespan">StyleSpan</a> objects. Setting the spans property is the preferred way to change the color of a polyline. Only on iOS and Android. |
#### StyleSpan
Describes the style for some region of a polyline.
| Prop | Type | Description |
| -------------- | ------------------- | --------------------------------------------------------------------------------- |
| **`color`** | <code>string</code> | The stroke color. All CSS3 colors are supported except for extended named colors. |
| **`segments`** | <code>number</code> | The length of this span in number of segments. |
#### CameraConfig
Configuration properties for a Google Map Camera
| Prop | Type | Description | Default |
| ----------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------ |
| **`coordinate`** | <code><a href="#latlng">LatLng</a></code> | Location on the Earth towards which the camera points. | |
| **`zoom`** | <code>number</code> | Sets the zoom of the map. | |
| **`bearing`** | <code>number</code> | Bearing of the camera, in degrees clockwise from true north. | <code>0</code> |
| **`angle`** | <code>number</code> | The angle, in degrees, of the camera from the nadir (directly facing the Earth). The only allowed values are 0 and 45. | <code>0</code> |
| **`animate`** | <code>boolean</code> | Animate the transition to the new Camera properties. | <code>false</code> |
| **`animationDuration`** | <code>number</code> | This configuration option is not being used. | |
#### MapPadding
Controls for setting padding on the 'visible' region of the view.
| Prop | Type |
| ------------ | ------------------- |
| **`top`** | <code>number</code> |
| **`left`** | <code>number</code> |
| **`right`** | <code>number</code> |
| **`bottom`** | <code>number</code> |
#### CameraIdleCallbackData
| Prop | Type |
| --------------- | ------------------------- |
| **`mapId`** | <code>string</code> |
| **`bounds`** | <code>LatLngBounds</code> |
| **`bearing`** | <code>number</code> |
| **`latitude`** | <code>number</code> |
| **`longitude`** | <code>number</code> |
| **`tilt`** | <code>number</code> |
| **`zoom`** | <code>number</code> |
#### CameraMoveStartedCallbackData
| Prop | Type |
| --------------- | -------------------- |
| **`mapId`** | <code>string</code> |
| **`isGesture`** | <code>boolean</code> |
#### ClusterClickCallbackData
| Prop | Type |
| --------------- | --------------------------------- |
| **`mapId`** | <code>string</code> |
| **`latitude`** | <code>number</code> |
| **`longitude`** | <code>number</code> |
| **`size`** | <code>number</code> |
| **`items`** | <code>MarkerCallbackData[]</code> |
#### MarkerCallbackData
| Prop | Type |
| --------------- | ------------------- |
| **`markerId`** | <code>string</code> |
| **`latitude`** | <code>number</code> |
| **`longitude`** | <code>number</code> |
| **`title`** | <code>string</code> |
| **`snippet`** | <code>string</code> |
#### MarkerClickCallbackData
| Prop | Type |
| ----------- | ------------------- |
| **`mapId`** | <code>string</code> |
#### MapClickCallbackData
| Prop | Type |
| --------------- | ------------------- |
| **`mapId`** | <code>string</code> |
| **`latitude`** | <code>number</code> |
| **`longitude`** | <code>number</code> |
#### PolygonClickCallbackData
| Prop | Type |
| --------------- | ------------------- |
| **`mapId`** | <code>string</code> |
| **`polygonId`** | <code>string</code> |
| **`tag`** | <code>string</code> |
#### CircleClickCallbackData
| Prop | Type |
| -------------- | ------------------- |
| **`mapId`** | <code>string</code> |
| **`circleId`** | <code>string</code> |
| **`tag`** | <code>string</code> |
#### PolylineCallbackData
| Prop | Type |
| ---------------- | ------------------- |
| **`polylineId`** | <code>string</code> |
| **`tag`** | <code>string</code> |
#### MyLocationButtonClickCallbackData
| Prop | Type |
| ----------- | ------------------- |
| **`mapId`** | <code>string</code> |
### Type Aliases
#### MapListenerCallback
The callback function to be called when map events are emitted.
<code>(data: T): void</code>
#### Marker
Supports markers of either "legacy" or "advanced" types.
<code>google.maps.<a href="#marker">Marker</a> | google.maps.marker.AdvancedMarkerElement</code>
### Enums
#### MapType
| Members | Value | Description |
| --------------- | ------------------------ | ---------------------------------------- |
| **`Normal`** | <code>'Normal'</code> | Basic map. |
| **`Hybrid`** | <code>'Hybrid'</code> | Satellite imagery with roads and labels. |
| **`Satellite`** | <code>'Satellite'</code> | Satellite imagery with no labels. |
| **`Terrain`** | <code>'Terrain'</code> | Topographic data. |
| **`None`** | <code>'None'</code> | No base map tiles. |
</docgen-api>