Class Veery.Pois

getWeight(index)

Get the amount of time (in percentage) spent on specified POIs.

Usually "Home" and "Office" are the two most weighted POIs of a person.

Parameters

Param name Type Usage
index Int 0 based index of the POI

Returns

Double representing the percentage of time (1 for 100%)

Usage / Example

    Veery.getPois(
        (pois) => {
            if (pois !== null) {
                if (pois.count()>0) {
        for(var i=0;i<pois.count();i++){
          console.log('Pois callback App.js==pois.getWeight() ['+i+']===>',pois.getWeight(i));
        }
      }
            }
    });

User interaction

none

See also

getPois

Get last known list of POIs for that user.

requestPoiUpdate

Request for a callback event when a new set of POIs is computed by the Veery Backend.

stopPoiUpdate

Cancel the call to requestPoiUpdate.

Pois.toArray

Return an array of CLLocationCoordinate2D object.

Pois.toGeoJSONArray

Return an array of GeoJSON (circles around the POIs).

Pois.count

Return the amount of POIs known.

Pois.getWeight

Return the percentage of time spent at the specified POI.

veeryPoiUpdate

Callback triggered every time a new set of POIs is computed by the Veery backend.