toMarker method

Marker? toMarker()

Converts this shape into a drawable map Marker (a polyline, part 0).

The marker carries points in travel direction — add it to a MarkerCollection with your polyline render settings (use the line's PTRouteInfo.routeColor so map and list agree). Each call creates a new marker; reuse the result rather than converting repeatedly.

Returns

  • A new Marker with the shape geometry, or null when points is empty (nothing drawable).

Implementation

Marker? toMarker() => points.isEmpty ? null : Marker.fromCoords(points);