routes property

MapViewRoutesCollection get routes

Get access to the collection of visible routes.

Routes represent calculated navigation paths displayed on the map. Use this collection to show, hide, and style route overlays, including highlighting alternative routes and displaying traffic information along routes.

Returns

  • (MapViewRoutesCollection) The routes collection for the view.

See also:

Implementation

MapViewRoutesCollection get routes {
  if (_routes == null) {
    final OperationResult resultString = objectMethod(
      _pointerId,
      'MapViewPreferences',
      'routes',
      dependencyId: _mapPointerId,
    );

    _routes = MapViewRoutesCollection.init(
      resultString['result'],
      _mapPointerId,
    );
  }
  return _routes!;
}