Class Veery.LocationsHistory

toGeoJSON(geometry : String)

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

Data? JSONObject

Usage / Example

  if let geojson = locationsHistory.toGeoJSON(geometry: Veery.GEOJSON_MULTIPOINT){
    geoJsonParser = GMUGeoJSONParser(data: geojson)
    geoJsonParser.parse()
    renderer = GMUGeometryRenderer(map: mapView, geometries: geoJsonParser.features)
    renderer.render()

    if let boundingbox = locationHistory.getBoundingBox(){
                let northest : CLLocationCoordinate2D = boundingbox[1]
                let southwest : CLLocationCoordinate2D =  boundingbox[0]
                let bounding :  GMSCoordinateBounds = GMSCoordinateBounds.init(coordinate:northest, coordinate:southwest  )
                let camera = GMSCameraUpdate.fit(bounding, withPadding:10.0)
                self.mapView.animate(with: camera)
          }
  }

Info

GeoJsonLayer classes are available on Google Maps API for IOS

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

Delegate triggered when the backend computed new trips.