Hi guys, I am using this code for my Geolocation
onLocate() {
const loader = this.loadingCtrl.create({
content: 'Getting your Location...'
});
loader.present();
Geolocation.getCurrentPosition()
.then(
location => {
loader.dismiss();
this.location.lat = location.coords.latitude;
this.location.lng = location.coords.longitude;
this.locationIsSet = true;
}
)
.catch(
error => {
loader.dismiss();
const toast = this.toastCtrl.create({
message: 'Could get location, please pick it manually!',
duration: 2500
});
toast.present();
}
);
}
Do you maybe know the addition to this code that i should make for me to have marker placed whenever i trigger Locate me button.
Thanks!