Class Veery.Locations

toGeoJSONArray()

Get an array of GeoJson representing the history collected.

Only valid for Veery.HISTORY_ROUTEMATCH.

(for Veery.HISTORY_RAW, see toGeoJSON)

Parameters

none

Returns

[GeoJSON]

Usage / Example

    Veery.getLocationHistory(Veery.HISTORY_ROUTEMATCH,1510876800000,new Date().getTime(),
    (locations) => {

        if (locations !== null) {
                let array = locations.toGeoJSONArray();
                console.log('locations ---toGeoJSONArray------',array.length);
                for (var i = 0; i < array.length; i++) {
                        let geoJson = array[i];
                        //.......
                }
        }
    })

User interaction

none

See also

getLocationHistory

Get the historical geolocation data for the mentioned period.

requestRouteMatch

Request Veery to be warned when a new trip was computed by the backend.

stopRouteMatch

Cancel the call to requestRouteMatch.

Locations.toArray

Extract an array of Location objects from a history.

Locations.toGeoJSON

Get a GeoJson representing the history collected. Get a GeoJson representing the history collected.

Locations.toGeoJSONArray

Get an array of GeoJson representing the history collected. Only valid for Veery.HISTORY_ROUTEMATCH.

Locations.getBoundingBox

Get the bounding box of the set of historical data.

veeryRouteMatch

Callback triggered when the backend computed new trips.