docs(background-geolocation): config method, example fix (#478)

This commit is contained in:
Justin Schuldt 2016-08-26 07:14:54 -05:00 committed by Ibrahim Hadeed
parent efa222fb55
commit 61716467df

View File

@ -188,13 +188,11 @@ export interface Config {
* }, (error) => { * }, (error) => {
* console.log('BackgroundGeolocation error'); * console.log('BackgroundGeolocation error');
* }, { * }, config);
* //options
* });
* *
* // Turn ON the background-geolocation system. The user will be tracked whenever they suspend the app. * // Turn ON the background-geolocation system. The user will be tracked whenever they suspend the app.
* BackgroundGeolocation.start(); * BackgroundGeolocation.start();
* } * })
* *
* // If you wish to turn OFF background-tracking, call the #stop method. * // If you wish to turn OFF background-tracking, call the #stop method.
* BackgroundGeolocation.stop(); * BackgroundGeolocation.stop();
@ -211,13 +209,14 @@ export class BackgroundGeolocation {
/** /**
* Configure the plugin. * Configure the plugin.
* Success callback will be called with one argument - Location object, which tries to mimic w3c Coordinates interface. *
* @param {Function} Success callback will be called when background location is determined.
* @param {Function} Fail callback to be executed every time a geolocation error occurs.
* @param {Object} An object of type Config
*
* @return Location object, which tries to mimic w3c Coordinates interface.
* See http://dev.w3.org/geo/api/spec-source.html#coordinates_interface * See http://dev.w3.org/geo/api/spec-source.html#coordinates_interface
* Callback to be executed every time a geolocation is recorded in the background. * Callback to be executed every time a geolocation is recorded in the background.
*
* Fail callback to be executed every time a geolocation error occurs.
*
* Options a json object of type Config
*/ */
@Cordova({ @Cordova({
sync: true sync: true