I’m update position in firebase of user with this code
ionViewDidLoad() {
this.getMyPosition();
}
getMyPosition() {
let watch = this.geolocation.watchPosition();
watch.subscribe((result) => {
this.positionTruck = new google.maps.LatLng(result.coords.latitude, result.coords.longitude);
const mapOptions = {
zoom: 18,
center: this.positionTruck,
disableDefaultUI: true
}
this.map = new google.maps.Map(document.getElementById('map'), mapOptions);
this.truckMarker(this.positionTruck);
this.markerDumps();
let truck = { latitude: result.coords.latitude, longitude: result.coords.longitude };
this.truckService.update(this.truck.key, truck);
})
}
but the markers are lagging behind
how to remove this markers ?