Osrm class
Osrm the main class for the SDK
This class contains all methods for the OSRM requests.
The class is initialized with an OsrmSource which is used to make the requests.
The OsrmSource is an interface which can be implemented by any class.
The SDK contains a default implementation of the OsrmSource which can be used (use your server url template builder).
The SDK also contains a OsrmMockSource
which can be used for testing.
Constructors
- Osrm({OsrmSource? source})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → OsrmSource
-
source the source for the requests
final
Methods
-
match(
MatchOptions options) → Future< MatchResponse> - match Map matching matches/snaps given GPS points to the road network in the most plausible way. Please note the request might result multiple sub-traces. Large jumps in the timestamps (> 60s) or improbable transitions lead to trace splits if a complete matching could not be found. The algorithm might not be able to match all points. Outliers are removed if they can not be matched successfully.
-
nearest(
NearestOptions options) → Future< NearestResponse> - nearest
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
route(
RouteRequest options) → Future< RouteResponse> - route Finds the fastest route between coordinates in the supplied order. Parameters:
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited