The Basics

Map Widget

mapController: MapController(),
options: MapOptions(),
children: [],
This is the main widget for this library, and it takes three main properties. options, children/layers, and a map controller which you can use to control the map from behind the scenes. These will be described in the following sections.
  • options (required)
    Takes a MapOptions that is used to configure overall map options and options that don't directly affect appearance.
  • children (required)
    Takes a list of Widgets that will be displayed on the map. These can be any widget, but are usually map layers. nonRotatedChildren is also available, and acts more like a Stack.
  • mapController (optional)
    Takes a MapController that can be used to programmatically control the map, as well as listen to an events Stream.
Do not use nonRotatedChildren to enforce a non-rotatable TileLayer.

Placement Recommendations

It is recommended to make the map as large as possible, to allow it to display a lot of useful information easily.
As such, we recommend using a depth-based layout (eg. using Stacks) instead of a flat-based layout (eg. using Columns). The following 3rd party packages might help with creating a modern design:
If you need to restrict the widget's size, you won't find a height or width property. Instead, use a SizedBox or Column/Row & Expanded.
Export as PDF
Copy link
Edit on GitHub
On this page
Map Widget
Placement Recommendations