Polygon Layer
PolygonLayer fills and outlines areas. Polygon keeps flutter_map's fields — points, holePointsList,
color, borderColor, borderStrokeWidth — drawn natively on Google Maps and MapKit, by flutter_map elsewhere.
PolygonLayer(
polygons: [
Polygon(points: countryBorder, color: Color(0x66009688), borderStrokeWidth: 2),
],
)
The demo outlines every European country, shows the tapped one's name, and highlights it on tap:
| Apple MapKit (iOS) | Google Maps (Android) |
|---|---|
![]() | ![]() |
Holes and taps
- Holes (
holePointsList) are supported. - A tap is resolved in Dart through the layer's hit tester — pass a
hitNotifiertoPolygonLayerand read the tapped polygon inMapOptions.onTap.

