Module Veery

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

The Listener veeryLocationUpdate is triggered when the user has moved.

Your are warned only if you are called the requestLocationUpdate() and the activate(Int) with a service higher than Veery.DEACTIVATE_ALL.

This could be used to refresh a Map

To stop the location update you shoud call stopLocationUpdate().

Parameters

Param name Type Usage
veeryLocationUpdate String LocationUpdate event
function(e: Event) function return The last Location

Returns

JSON object

Android

{
    "accuracy" : Double,
     "altitude" : Double,
     "bearing"  : Double,
     "elapsedRealtimeNanos" : Double,
     "latitude" : Double,
     "longitude"  : Double,
     "provider" : String,
     "speed" : Double,
     "time"  : Double,
     "age"   : Double
}

IOS

{
    "altitude" : Double,
    "latitude" : Double,
    "longitude"  : Double,
    "course" : Double,
    "speed" : Double,
    "horizontalAccuracy"  : Double,
    "verticalAccuracy" :Double ,
    "timestamp" : String
}

Usage / Example

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

    DeviceEventEmitter.addListener('veeryLocationUpdate', function(e: Event) {
        // handle event.
        console.log('DeviceEventEmitter ===> LocationUpdate', e);
    });

User interaction

none

See also

getCurrentLocation()

Get the last known Location collected by Veery.

getCurrentLocationAge()

Available only for Android Platform

Get age (in seconds) of the last known location.

requestLocationUpdate()

Request Veery to be warned when the user has moved.

stopLocationUpdate()

Cancel the call to requestLocationUpdate.

veeryLocationUpdate

Callback triggered when the user has moved.