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
JSONObject [ ]
{ "type":"FeatureCollection", "features": [ { "type":"Feature", "geometry": { "type":"MultiLineString", "coordinates":[ [ [ 48.8566 , 2.3522 ], [ 43.2965 , 5.3698 ], [ 48.8566 , 2.3522 ] ], [ [ 48.8566 , 2.3522 ], [ 43.2965 , 5.3698 ], [ 48.8566 , 2.3522 ] ] ] } } ] }
Usage / Example
final JSONObject[] geoJsonData = locations.toGeoJSONArray(); if (geoJsonData != null) { for (int i = 0; i<geoJsonData.length;i++) { JSONObject object = geoJsonData[i]; GeoJsonLayer layer = new GeoJsonLayer(mMap, object); layer.addLayerToMap(); } }
User interaction
none
See also
getLocationHistory
Get the historical geolocation data for the mentioned period.
countLocationHistory
Count Historical data of Geolocations observed during a given period of time.
requestRouteMatch
Request for a callback event when a new trip is routematched by the Veery Backend.
Locations.toArray
Return an array of Location object.
Locations.toGeoJSON
Return a GeoJSON containing the set of locations (Point or MultiLineString).
Locations.toGeoJSONArray
Return an array of GeoJSON.
Locations.getBoundingBox
Get the bounding box which envelopes all locations in the set.
RouteMatch.onRouteMatch
Callback triggered every time a trip is computed by the Veery backend.