Class Veery.Locations

toGeoJSON(geometry)

Get a GeoJson representing the history collected.

Only valid for Veery.HISTORY_RAW.

Parameters

Param name Type Usage
geometry String Veery.GEOJSON_MULTIPOINT : Will build a MultiPoint based Json
Veery.GEOJSON_LINESTRING : Will build a LineString based Json

Returns

GeoJSON object

Usage / Example

Veery.getLocationHistory(Veery.HISTORY_RAW,1510876800000,new Date().getTime(),
(locations) => {
  if (locations !== null) {

    let geoJson = locations.toGeoJSON(Veery.GEOJSON_MULTIPOINT);
    console.log('locations App.js---toGeoJSON------',geoJson);

  }
})

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.