To display anything on the map, you'll need to include at least one "layer"!
Multiple layers can be used - similar to a Stack - each one showing different data in different ways, from actual map tiles (Tile Layer) to shapes on top of them (Polygon Layer), and even just your own custom layers (Creating New Layers).
Example Flutter Map widget, showing an OpenStreetMap map, with multiple shapes overlaid on it
Example FlutterMap, containing a Marker, Polyline, Polygon, and RichAttributionLayer on top of a TileLayer
Each layer has its own configuration and handling, but can also access the map's state/configuration, as well as be controlled by it.
Layers are usually defined in the children property of the FlutterMap - as is with the TileLayer, for example.
However, the nonRotatedChildren property can be used for layers which shouldn't move with the map, but still require access to the map's state/configuration - for example, the AttributionLayers.
Do not use nonRotatedChildren to enforce a non-rotatable map/TileLayer.
Instead, use interactiveFlags: Permanent Rules. These apply to the entire map and all layers.
© flutter_map Authors & Contributors