1.0.2 • Published 7 years ago
cordova-plugin-geolocator v1.0.2
cordova-plugin-geolocator
Goal is to get the most reliable position in given time by using the GPS_PROVIDER. If the given time finishes before accurate GPS-position, NETWORK-based position is returned.
Installation
This requires cordova 5.0+
cordova plugin add cordova-plugin-geolocator
Supported Platforms
- Android
Usage
geolocator.getCurrentPosition({
timeout:6000
},
function(position) { // Success callback
console.log(position.coords.latitude, position.coords.longitude);
/*
position.coords.altitude
position.timestamp
position.provider (NETWORK_PROVIDER, GPS_PROVIDER)
*/
},
function(error) { // Error callback
console.log(error);
}
);
1.0.2
7 years ago