cabrillo.geolocation - Client

Cabrillo JS functions to provide access to the device's location services.

cabrillo.geolocation - getCurrentLocation()

Returns the current location of the device.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
promise A Cabrillo.Location object or an error.
cabrillo.geolocation.getCurrentLocation().then(function(location) {
    console.log('Current location:', location);
}, function(error) {
    console.log('Failed to get current location.', error);