diff --git a/src/plugins/geolocation.ts b/src/plugins/geolocation.ts index 289a1caec..b2f15ef93 100644 --- a/src/plugins/geolocation.ts +++ b/src/plugins/geolocation.ts @@ -121,14 +121,22 @@ export interface GeolocationOptions { * Geolocation.getCurrentPosition().then((resp) => { * // resp.coords.latitude * // resp.coords.longitude - * }) + * }).catch((error) => { + * console.log('Error getting location', error); + * }); * * let watch = Geolocation.watchPosition(); * watch.subscribe((data) => { + * // data can be a set of coordinates, or an error (if an error occurred). * // data.coords.latitude * // data.coords.longitude - * }) + * }); * ``` + * @interfaces + * Coordinates + * Geoposition + * PositionError + * GeolocationOptions */ @Plugin({ plugin: 'cordova-plugin-geolocation',