MapViewRoutesCollection class Maps & 3D Scenes

Collection managing routes displayed on a map view.

MapViewRoutesCollection stores and manages routes displayed by a map instance. Use the MapViewPreferences.routes getter to obtain the collection for a given map.

The collection supports adding routes (one main route and zero or more secondary routes), updating render settings and labels, centering the camera on displayed routes, and removing routes.

Example

controller.preferences.routes.add(route, true);

See also:

Implemented types

Constructors

MapViewRoutesCollection(dynamic id, int mapPointerId)

Properties

first Route
The first element.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasInit bool
getter/setter pair
hasRegisteredAutoReleaseObject bool
getter/setter pairinherited
isEmpty bool
Whether this collection has no elements.
no setterinherited
isNotEmpty bool
Whether this collection has at least one element.
no setterinherited
iterator Iterator<Route>
A new Iterator that allows iterating the elements of this Iterable.
no setterinherited
last Route
The last element.
no setterinherited
length int
The number of elements in this Iterable.
no setterinherited
mainRoute Route?
The current main route in the collection, if any.
getter/setter pair
mapPointerId int
no setter
pointerId int
The pointer ID of the native object
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single Route
Checks that this iterable has only one element, and returns that element.
no setterinherited

Methods

add(Route route, bool bMainRoute, {String? label, List<Img>? labelIcons, RouteRenderSettings? routeRenderSettings, bool autoGenerateLabel = false}) → void
Add or update a route in the collection with optional render settings and label.
addMapViewRoute(MapViewRoute route) → void
Add or update a MapViewRoute instance in the collection.
any(bool test(Route element)) bool
Checks whether any element of this iterable satisfies test.
inherited
at(int position) Route
inherited
cast<R>() Iterable<R>
A view of this iterable as an iterable of R instances.
inherited
clear() → void
Remove all routes from the collection.
clearAllButMainRoute() → void
Remove all secondary routes, leaving the main route in the collection.
contains(Object? element) bool
Whether the collection contains an element equal to element.
inherited
dispose() → void
Disposes the native object.
elementAt(int index) Route
Returns the indexth element.
inherited
every(bool test(Route element)) bool
Checks whether every element of this iterable satisfies test.
inherited
expand<R>(Iterable<R> toElements(Route element)) Iterable<R>
Expands each element of this Iterable into zero or more elements.
inherited
firstWhere(bool test(Route element), {Route orElse()?}) Route
The first element that satisfies the given predicate test.
inherited
fold<R>(R initialValue, R combine(R previousValue, Route element)) → R
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable<Route> other) Iterable<Route>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(Route element)) → void
Invokes action on each element of this iterable in iteration order.
inherited
getLabel(Route route) String
Retrieve the label text currently shown for route.
getMapViewRoute(int index) MapViewRoute?
Get the MapViewRoute wrapper for the route at index.
getRenderSettings(Route route) RouteRenderSettings?
Get the route custom render settings (read-only).
getRoute(int index) Route?
Get the Route object present at index in the collection.
hideLabel(Route route) → void
Hide the label for route.
indexOf(Route route) int
Get the index of route in the collection.
isMainRoute(Route route) bool
Check whether route is marked as the main route in the collection.
join([String separator = '']) String
Converts each element to a String and concatenates the strings.
inherited
lastWhere(bool test(Route element), {Route orElse()?}) Route
The last element that satisfies the given predicate test.
inherited
map<R>(R toElement(Route e)) Iterable<R>
The current elements of this iterable modified by toElement.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reduce(Route combine(Route value, Route element)) Route
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
remove(Route route) → void
Remove the route from the collection.
setLabel(Route route, String text) → void
Set the label text for route.
setRenderSettings(Route route, RouteRenderSettings settings) → void
Set route render settings.
singleWhere(bool test(Route element), {Route orElse()?}) Route
The single element that satisfies test.
inherited
size() int
inherited
skip(int count) Iterable<Route>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(Route value)) Iterable<Route>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
take(int count) Iterable<Route>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(Route value)) Iterable<Route>
Creates a lazy iterable of the leading elements satisfying test.
inherited
toList({bool growable = true}) List<Route>
Creates a List containing the elements of this Iterable.
inherited
toSet() Set<Route>
Creates a Set containing the same elements as this iterable.
inherited
toString() String
A string representation of this object.
inherited
where(bool test(Route element)) Iterable<Route>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereType<U>() Iterable<U>
Creates a new lazy Iterable with all elements that have type T.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) Route
inherited