I have an ionic 4 app which uses cordova and the google maps api. I am using the HTML5 geoloction plugin which watches the device 's position as the user moves and then generates a new googleMaps marker and displays it on the map.
this.watchLocation = await this.geolocation
.watchPosition()
.subscribe(location => {
this.map.animateCamera({
target: {
lat: location.coords.latitude,
lng: location.coords.longitude
},
zoom: 16,
duration: 1000
});
this.marker.setPosition({
lat: location.coords.latitude,
lng: location.coords.longitude
});
With the code above, i have tested the app on a Samsung note 9 and the results are 100% accurate. I have also tested the same app on other android devices (Galaxy A20 and Huawei Y5) and the results are not accurate, instead the marker jumps out of position for about 50 to 200 meters from my position.
