Poi Update

DeviceEventEmitter.addListener('veeryPoisUpdate', function(e: Event) {})

Listener veeryPoisUpdate triggered when the backend computed new set of POIs.

Your are warned only if you are called the requestPoiUpdate and the activate( Int) with a service that include Veery.POINT_OF_INTEREST.

This could be used to refresh a Maps.

Parameters

Param name Type Usage
veeryPoisUpdate String PoisUpdate event
function(e: Event) function The whole set of POIs (Veery.Pois)

Usage / Example

    import React, { Component } from 'react';
    import { DeviceEventEmitter} from 'react-native';
    import Veery from 'react-native-veery';

    DeviceEventEmitter.addListener('veeryPoisUpdate', function(e: Event) {
            // handle event.
            let pois = e;
            console.log('DeviceEventEmitter ===> PoisUpdate', pois.count());
    });

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.