SearchGeojson class

A helper extension providing methods for accessing the response data in GeoJSON format.

Methods

getFeatures()

Returns a GeoJSON feature collection built from the results. Each feature in the collection is a Point representing one result. The properties of each feature match the properties of the result, except the position property is omitted because it is already the coordinate of the point. Each feature's properties also includes a resultIndex. The resultIndex is the index of the route within the original results array.

Method Details

getFeatures()

Returns a GeoJSON feature collection built from the results. Each feature in the collection is a Point representing one result. The properties of each feature match the properties of the result, except the position property is omitted because it is already the coordinate of the point. Each feature's properties also includes a resultIndex. The resultIndex is the index of the route within the original results array.

function getFeatures()

Returns

FeatureCollection<Point>