Skip to content

Commit a2c088b

Browse files
committed
Update README
1 parent 9f58d1a commit a2c088b

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

packages/google_maps_flutter/google_maps_flutter/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,21 @@ the `GoogleMap`'s `onMapCreated` callback.
121121
The `GoogleMap` widget should be used within a widget with a bounded size. Using it
122122
in an unbounded widget will cause the application to throw a Flutter exception.
123123

124+
### Advanced Markers
125+
126+
[Advanced Markers](https://developers.google.com/maps/documentation/javascript/advanced-markers/overview) are map markers that offer extra customization options. [Map Id](https://developers.google.com/maps/documentation/get-map-id) is required in order to use Advanced Markers:
127+
128+
```dart
129+
GoogleMap(
130+
// Set your Map Id
131+
mapId: 'my-map-id',
132+
133+
// Let map know that you're using Advanced Markers
134+
markerType: MarkerType.advancedMarker,
135+
...
136+
),
137+
```
138+
124139
### Sample Usage
125140

126141
<?code-excerpt "readme_sample.dart (MapSample)"?>

packages/google_maps_flutter/google_maps_flutter_web/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,26 @@ Modify the `<head>` tag of your `web/index.html` to load the Google Maps JavaScr
3232
The Google Maps Web SDK splits some of its functionality in [separate libraries](https://developers.google.com/maps/documentation/javascript/libraries#libraries-for-dynamic-library-import).
3333

3434
If your app needs the `drawing` library (to draw polygons, rectangles, polylines,
35-
circles or markers on a map), include it like this:
35+
circles or legacy markers on a map), include it like this:
3636

3737
```html
3838
<script
3939
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=drawing">
4040
</script>
4141
```
4242

43+
If your app uses Advanced Markers, include `marker` library like this:
44+
```html
45+
<script
46+
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=marker">
47+
</script>
48+
```
49+
4350
To request multiple libraries, separate them with commas:
4451

4552
```html
4653
<script
47-
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=drawing,visualization,places">
54+
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=drawing,marker,visualization,places">
4855
</script>
4956
```
5057

0 commit comments

Comments
 (0)