paths property

MapViewPathCollection get paths

Get access to the collection of visible paths.

Paths are vector polylines drawn on the map, useful for showing custom trails, boundaries, or other line-based elements. Use this collection to add and configure path overlays.

Returns

  • (MapViewPathCollection) The path collection for the view.

See also:

  • MapViewPathCollection - Manage visible paths.
  • routes - Route collections.
  • markers - Marker collections.

Implementation

MapViewPathCollection get paths {
  if (_paths == null) {
    final OperationResult resultString = objectMethod(
      _pointerId,
      'MapViewPreferences',
      'paths',
      dependencyId: _mapPointerId,
    );

    _paths = MapViewPathCollection.init(
      resultString['result'],
      _mapId,
      _mapPointerId,
    );
  }
  return _paths!;
}