# Marker Layer

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

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

{% hint style="warning" %}
Excessive use of markers or use of complex markers will create performance issues and lag/'jank' as the user interacts with the map. See [Broken mention](broken://pages/8uYmNyVwhN9XeXr5DcWy) for more information.

If you need to use a large number of markers, an existing [community maintained plugin (`flutter_map_marker_cluster`)](https://github.com/lpongetti/flutter_map_marker_cluster) might help.&#x20;
{% endhint %}

## Markers (`markers`)

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

<table><thead><tr><th width="215">Property</th><th width="217">Type</th><th>Defaults</th><th>Description</th></tr></thead><tbody><tr><td><code>point</code></td><td><code>LatLng</code></td><td>required</td><td>Marker position on map</td></tr><tr><td><code>builder</code></td><td><code>WidgetBuilder</code></td><td>required</td><td>Builder used to render marker</td></tr><tr><td><code>width</code></td><td><code>double</code></td><td><code>30</code></td><td>Marker width</td></tr><tr><td><code>height</code></td><td><code>double</code></td><td><code>30</code></td><td>Marker height</td></tr><tr><td><code>rotate</code></td><td><code>bool?</code></td><td><code>false</code>*</td><td>If true, marker will be counter rotated to the map rotation</td></tr><tr><td><code>rotateOrigin</code></td><td><code>Offset?</code></td><td></td><td>The origin of the marker in which to apply the matrix</td></tr><tr><td><code>rotateAlignment</code></td><td><code>AlignmentGeometry?</code></td><td></td><td>The alignment of the origin, relative to the size of the box</td></tr><tr><td><code>anchorPos</code></td><td><code>AnchorPos?</code></td><td></td><td>Point of the marker which will correspond to marker's location</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fleaflet.dev/v3/usage/layers/marker-layer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
