RouteBookmarks class Routes & Navigation

Manages a persistent collection of saved routes (bookmarks).

Provides operations to create, add, import, update, remove and export saved routes. Use RouteBookmarks.create to open or create a named bookmarks collection backed by a file.

See also:

  • RoutePreferences - preferences that can be stored with a bookmarked route.
  • Landmark - waypoints used to define routes.

Constructors

RouteBookmarks.create(String name)
Open or create a bookmarks collection with the provided name.
factory

Properties

autoDeleteMode bool
Whether the underlying bookmarks database is automatically deleted when this object is destroyed.
getter/setter pair
filePath String
File path of the bookmarks collection used by this RouteBookmarks instance.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasRegisteredAutoReleaseObject bool
getter/setter pairinherited
pointerId int
The pointer ID of the native object
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
Number of bookmarked routes in this collection.
no setter
sortOrder RouteBookmarksSortOrder
Change the sort order used to present routes from this collection.
no getter

Methods

add(String name, List<Landmark> waypoints, {RoutePreferences? preferences, bool overwrite = false}) → void
Adds a new route or updates an existing one in this bookmarks collection.
addTrips(String filename) int
Import routes from a file and add them to this bookmarks collection.
clear() → void
Remove all routes from this bookmarks collection.
dispose() → void
Disposes the native object.
inherited
exportToFile(int index, String path) GemError
Export a bookmarked route to the filesystem.
find(String name) int
Find a bookmarked route by its name.
getName(int index) String?
Returns the name of the bookmarked route at index, or null when the index is invalid.
getPreferences(int index) RoutePreferences?
Retrieves the RoutePreferences saved with the route at index.
getTimestamp(int index) DateTime?
UTC timestamp of when the route was saved.
getWaypoints(int index) List<Landmark>?
Returns the list of Landmark waypoints for the route at index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
remove(int index) → void
Remove the bookmarked route at index.
toString() String
A string representation of this object.
inherited
update(int index, {String? name, List<Landmark>? waypoints, RoutePreferences? preferences}) → void
Update an existing bookmarked route.

Operators

operator ==(Object other) bool
The equality operator.
inherited