Module Veery

requestLocationUpdate()

Request Veery to be warned when the user has moved.

The best way it's to call this function in the componentWillMount(). Or when you need to start a localization.

Parameters

none

Usage / Example

    import React, { Component } from 'react';
    import {Platform,StyleSheet,Text,Button,View} from 'react-native';
    import Veery from 'react-native-veery';

    export default class App extends Component<{}> {

        componentWillMount(){
                    Veery.serviceConnect();
                    Veery.setApiKeySecret('SuPeRScrET12345789GhJ');
                    //
                    Veery.activate(Veery.GEOPROFILE);
                    // Requires react-native-veery 1.4.4 or higher
                    //  Veery.activate(Veery.BACKGROUND_GEOLOC  | Veery.COLLECT | Veery.ROUTE_MATCH | Veery.POINT_OF_INTEREST | Veery.PREDICTION );
                    Veery.requestLocationUpdate();
                }

        current(){
            Veery.requestLocationUpdate(); // Other Example were you can use it
            Veery.getCurrentLocation(
                (location) => {
                        console.log('getCurrentLocation--longitude', location.longitude);
                        console.log('getCurrentLocation--latitude', location.latitude);
                    }
                )
                }

        render() {
            return(

                    <View >

                        <Text > Welcome to VeeryDemoReactNative!</Text>

                        <Button
                                    onPress = {this.current}
                                    title="currentLocation"
                                    color="#8FFF04"/>
                    </View>

                );}
        }

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.