# Marker Layer

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

{% hint style="success" %}
No more image only markers! [Unlike *other* ](https://github.com/flutter/flutter/issues/24213)😉[^1][ popular mapping libraries](https://github.com/flutter/flutter/issues/24213), we allow usage of any widget as the marker.
{% endhint %}

{% embed url="<https://pub.dev/documentation/flutter_map/latest/flutter_map.plugin_api/MarkerLayer-class.html>" %}

{% embed url="<https://pub.dev/documentation/flutter_map/latest/flutter_map.plugin_api/Marker-class.html>" %}

<figure><img src="https://3763054464-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEu7Wsb5fFesagMRRFtta%2Fuploads%2FVjlMYmNlEYY8jzwn893H%2FExampleMarker.png?alt=media&#x26;token=84df6250-d5b7-4c01-bc8f-453b4ae0e041" alt=""><figcaption><p>An example <code>Marker</code>, using <code>FlutterLogo</code> as the child</p></figcaption></figure>

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

{% hint style="warning" %}
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: [#marker-clustering](https://docs.fleaflet.dev/v5/plugins/list#marker-clustering "mention").
{% endhint %}

## 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`.

[^1]: [Google Maps \*wink \*wink](https://github.com/flutter/flutter/issues/24213)
