All pages
Powered by GitBook
1 of 1

Loading...

Marker Layer

You can add single point features - such as pins, labels, or markers - to maps using MarkerLayer and Markers.

No more image only markers! Unlike other 😉 popular mapping libraries, we allow usage of any widget as the marker.

An example Marker, using FlutterLogo as the child
MarkerLayer(
  markers: [
    Marker(
      point: LatLng(30, 40),
      width: 80,
      height: 80,
      builder: (context) => FlutterLogo(),
    ),
  ],
),

Excessive use of markers may create performance issues.

Consider using a clustering plugin to merge nearby markers together, reducing the work that needs to be done when rendering: .

Rotation

Marker rotation support isn't built in (other than counter rotating to the map, to ensure the marker is always displayed right side up), but can easily be implemented through a rotation widget, such as Transform.rotate.

Marker Clustering
https://pub.dev/documentation/flutter_map/latest/flutter_map.plugin_api/Marker-class.htmlpub.dev
https://pub.dev/documentation/flutter_map/latest/flutter_map.plugin_api/MarkerLayer-class.htmlpub.dev