TransitItineraryGeojson class
A helper extension providing methods for accessing the response data in GeoJSON format.
Methods
get |
Returns a GeoJSON feature collection built from the itinerary.
Each feature in the collection is a |
Method Details
getFeatures()
Returns a GeoJSON feature collection built from the itinerary.
Each feature in the collection is a LineString
representing one leg of the itinerary.
Legs which don't specify start and end positions will be omitted from the collection,
e.g. "Wait"
or sometimes "PathWayWalk"
.
If geometry details were requested the LineStrings will follow those geometries.
If geometry details were not requested the LineStrings will directly connect the start and end points of the leg.
The properties of each feature match the properties of the Leg
, except
the geometry
, origin
, and destination
properties is omitted
because they are redundant with the feature's coordinates.
function getFeatures(): FeatureCollection<LineString>
Returns
FeatureCollection<LineString>