Class Veery.Locations
toGeoJSON(String 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
{ "type":"FeatureCollection", "features": [ { "type":"Feature", "geometry": { "type":"MultiPoint", "coordinates":[ [ 48.8566 , 2.3522 ], [ 43.2965 , 5.3698 ], [ 48.8566 , 2.3522 ] ] } } ] }
Usage / Example
JSONObject geoJsonData = locations.toGeoJSON(Veery.GEOJSON_MULTIPOINT); if (geoJsonData != null) { GeoJsonLayer layer = new GeoJsonLayer(mMap, geoJsonData); layer.addLayerToMap(); LatLngBounds latLngBounds = Veery.getBoundingBox(layer); if (latLngBounds != null) mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(latLngBounds,100)); }
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.