Markers topic

Use the markers module to create, organize and render map annotations and geometric markers. This system provides lightweight geometry models, collection management, and flexible rendering controls so you can display points, polylines and polygons efficiently on the map. It helps apps handle bulk marker workflows, per-item styling, hit-testing and grouping for performant, interactive map markers.

  • Marker: A compact model for a visual geometry placed on the map. Use it to represent points, polylines or polygons with optional multipart shapes and lightweight metadata so your app can store geometry, names and coordinate lists for annotations or temporary content.
  • MarkerCollection: A grouped container for markers that share the same visual type. Use collections to organize large marker sets, perform hit-tests, and present groups of markers to map views with consistent rendering settings.
  • MarkerSketches: A specialized collection that supports per-marker render presets. Use sketches when you need individual visual overrides or temporary/drawn annotations that require unique appearance without changing collection-level defaults.
  • MarkerRenderSettings: Per-marker visual configuration for icons, labels, polyline and polygon styling. Use these settings to control image size, labeling modes and color/stroke detail for single markers.
  • MarkerCollectionRenderSettings: Collection-level rendering options that extend per-marker settings with density grouping, group images, grouping zoom levels and textures. Use collection settings to tune clustering, group labels and collection-wide visuals for large datasets.
  • MarkerMatch: A hit-test result describing a matched marker, its collection, part/segment indices and distance. Use it when you need precise interaction feedback or selection results from hit testing across collections.

Markers components work together to enable performant, interactive map annotations: build geometries with Marker, group them in MarkerCollection for efficient management, and apply MarkerCollectionRenderSettings for global behaviour (grouping, textures) while using MarkerRenderSettings for per-item overrides. For interactive or user-drawn content, MarkerSketches provides a convenient per-marker styling surface.

For practical usage prefer these patterns: obtain or create a MarkerCollection and populate it with Marker instances, then add the collection to your map view so the SDK handles rendering and grouping. Use MarkerSketches for temporary or per-item styling and MarkerMatch results to implement precise selection and hit-test driven interactions.

Learn more about markers: https://developer.magiclane.com/docs/flutter/guides/core/markers

Classes

Marker Markers
A compact model representing a visual geometry placed on the map.
MarkerCollection Markers
A collection that holds markers of the same visual style and geometry.
MarkerInfo Markers
Marker info
MarkerJson Markers
A simplified representation of a Marker
MarkerMatch Markers
A single match found when querying the map for markers.
MarkerSketches Markers
A specialized, per-marker render configuration collection.
MarkerWithRenderSettings Markers
Contains a marker and its render settings

Extensions

MarkerTypeExtension on MarkerType Markers

Enums

MarkerMatchType Markers
Marker match type
MarkerType Markers
The type of geometry represented by markers in a collection.