Skip to content

Commit be481c7

Browse files
committed
Update README
1 parent 5b61f58 commit be481c7

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
@@ -116,6 +116,21 @@ the `GoogleMap`'s `onMapCreated` callback.
116116
The `GoogleMap` widget should be used within a widget with a bounded size. Using it
117117
in an unbounded widget will cause the application to throw a Flutter exception.
118118

119+
### Advanced Markers
120+
121+
[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:
122+
123+
```dart
124+
GoogleMap(
125+
// Set your Map Id
126+
mapId: 'my-map-id',
127+
128+
// Let map know that you're using Advanced Markers
129+
markerType: MarkerType.advancedMarker,
130+
...
131+
),
132+
```
133+
119134
### Sample Usage
120135

121136
<?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)