flutter_map Docs
Project Links💝 Support Us
v3
v3
  • flutter_map
  • Getting Started
    • Installation
    • Additional Setup
    • Examples
    • How Does It Work?
      • Raster vs Vector Tiles
  • Usage
    • Base Widget
    • Options
      • Recommended Options
      • Other Options
    • Layers
      • Tile Layer
        • Recommended Options
        • Tile Providers
        • Other Options
      • Marker Layer
      • Polygon Layer
      • Polyline Layer
      • Circle Layer
      • Attribution Layer
      • WMS Usage
    • Controller
    • Full API Reference
  • Plugins
    • Plugins List
    • Making A Plugin
      • Creating New Tile Providers
      • Creating New Layers
  • Tile Servers
    • Using Mapbox
    • Using Stadia Maps
    • Using Thunderforest
    • Offline Mapping
    • Other Options
  • FAQs
    • Frequently Asked Questions
    • Map Controller Issues
  • Migration
    • To v3.0.0
    • To v2.0.0
    • Older Versions
      • To v1.1.0
      • To v1.0.0
      • To v0.15.0
  • Contributing
  • Credits
Powered by GitBook

© flutter_map Authors & Maintainers

On this page

Was this helpful?

Export as PDF
  1. Usage
  2. Layers

Marker Layer

PreviousOther OptionsNextPolygon Layer

Last updated 2 years ago

Was this helpful?

You can add markers to maps to display specific points to users using MarkerLayer().

FlutterMap(
    options: MapOptions(),
    children: [
        MarkerLayer(
            markers: [
                Marker(
                  point: LatLng(30, 40),
                  width: 80,
                  height: 80,
                  builder: (context) => FlutterLogo(),
                ),
            ],
        ),
    ],
),

Excessive use of markers or use of complex markers will create performance issues and lag/'jank' as the user interacts with the map. See for more information.

If you need to use a large number of markers, an existing might help.

Markers (markers)

As you can see MarkerLayerOptions() accepts list of Markers which determines render widget, position and transformation details like size and rotation.

Property
Type
Defaults
Description

point

LatLng

required

Marker position on map

builder

WidgetBuilder

required

Builder used to render marker

width

double

30

Marker width

height

double

30

Marker height

rotate

bool?

false*

If true, marker will be counter rotated to the map rotation

rotateOrigin

Offset?

The origin of the marker in which to apply the matrix

rotateAlignment

AlignmentGeometry?

The alignment of the origin, relative to the size of the box

anchorPos

AnchorPos?

Point of the marker which will correspond to marker's location

community maintained plugin (flutter_map_marker_cluster)