RouteGeojson class
A helper extension providing methods for accessing the response data in GeoJSON format.
Methods
get |
Returns a GeoJSON feature collection built from the routes.
Each feature in the collection is a MultiLineString representing one route.
The MultiLineString contains LineStrings representing a leg of the route.
The properties of each feature match the properties of the |
Method Details
getFeatures()
Returns a GeoJSON feature collection built from the routes.
Each feature in the collection is a MultiLineString representing one route.
The MultiLineString contains LineStrings representing a leg of the route.
The properties of each feature match the properties of the route
, except
the legs
property is replaced by a legSummaries
property which is an array
of the summaries of each leg. The coordinates of each leg are already part
of the MultiLineString's coordinates. Each feature's properties also includes
a resultIndex. The resultIndex is the index of the route within the original routes
array.
function getFeatures(): FeatureCollection<MultiLineString>
Returns
FeatureCollection<MultiLineString>