Hi,
after updating the Geolocation plugin in a Ionic4/Cordova app, I have this error:
[ng] Property 'coords' does not exist on type 'PositionError'.
[ng] ...: error TS2339: Property 'coords' does not exist on type 'Geoposition | PositionError'.
I have always used the plugin in this way:
this.geolocation.watchPosition(geo_options)
.subscribe(position => {
this.currentLatitude = position.coords.latitude;
this.currentLongitude = position.coords.longitude;
The Cordova plugin and the Ionic module are:
cordova-plugin-geolocation 4.0.2 "Geolocation"
"@ionic-native/geolocation": "^5.28.0",
Why the Geoposition object doesn’t have the property coords?
Claudio