Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getCurrentLocation = (resetGeo) => {
BackgroundGeolocation.getCurrentPosition((location) => {
//console.log('- getCurrentPosition success: ', location);
this.addMarker(location);
this.setCenter(location)
if (resetGeo) {
this.resetGeoLocation();
} else {
this.checkRunState();
}
}, (error) => {
console.warn('- getCurrentPosition error: ', error);
}, { persist: true, samples: 1 });
}