DirectionRouteData class
A class that encapsulates Direction Route data received from the JSON endpoint of Directions API.
Includes the Route's summary, segments, bbox, geometry
and waypoints
.
https://openrouteservice.org/dev/#/api-docs/v2/directions/{profile}/post
Constructors
-
DirectionRouteData({required DirectionRouteSummary summary, required List<
DirectionRouteSegment> segments, required List<Coordinate> bbox, required String geometry, required List<double> wayPoints}) -
const
-
DirectionRouteData.fromJson(Map<
String, dynamic> json) -
Generates a DirectionRouteData from a received Map having the keys
'summary', 'segments', 'bbox', 'geometry', and 'way_points'.
factory
Properties
-
bbox
→ List<
Coordinate> -
The bounding box covering the route.
final
- geometry → String
-
The geometry of the route as encoded polyline.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
segments
→ List<
DirectionRouteSegment> -
The list of
DirectionRouteSegment
s comprising the route.final - summary → DirectionRouteSummary
-
The summary of the route.
final
-
wayPoints
→ List<
double> -
The list of waypoints marking the route.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the DirectionRouteData to a Map with keys 'summary', 'segments', 'bbox', 'geometry', and 'way_points'.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited