1
- part of flutter_platform_maps ;
1
+ part of platform_maps_flutter ;
2
2
3
3
typedef void MapCreatedCallback (PlatformMapController controller);
4
4
@@ -22,6 +22,7 @@ class PlatformMap extends StatefulWidget {
22
22
this .myLocationButtonEnabled = false ,
23
23
this .markers,
24
24
this .polylines,
25
+ this .polygons,
25
26
this .onCameraMoveStarted,
26
27
this .onCameraMove,
27
28
this .onCameraIdle,
@@ -68,6 +69,9 @@ class PlatformMap extends StatefulWidget {
68
69
/// Polylines to be placed on the map.
69
70
final Set <Polyline > polylines;
70
71
72
+ /// Polygons to be placed on the map.
73
+ final Set <Polygon > polygons;
74
+
71
75
/// Called when the camera starts moving.
72
76
///
73
77
/// This can be initiated by the following:
@@ -168,6 +172,9 @@ class _PlatformMapState extends State<PlatformMap> {
168
172
polylines: widget.polylines != null
169
173
? Polyline .toGoogleMapsPolylines (widget.polylines)
170
174
: widget.polylines,
175
+ polygons: widget.polygons != null
176
+ ? Polygon .toGoogleMapsPolygonSet (widget.polygons)
177
+ : widget.polygons,
171
178
gestureRecognizers: widget.gestureRecognizers,
172
179
onCameraIdle: widget.onCameraIdle,
173
180
myLocationButtonEnabled: widget.myLocationButtonEnabled,
@@ -199,6 +206,9 @@ class _PlatformMapState extends State<PlatformMap> {
199
206
polylines: widget.polylines != null
200
207
? Polyline .toAppleMapsPolylines (widget.polylines)
201
208
: widget.polylines,
209
+ polygons: widget.polygons != null
210
+ ? Polygon .toAppleMapsPolygonSet (widget.polygons)
211
+ : widget.polygons,
202
212
gestureRecognizers: widget.gestureRecognizers,
203
213
onCameraIdle: widget.onCameraIdle,
204
214
myLocationButtonEnabled: widget.myLocationButtonEnabled,
0 commit comments