From dbf95ea4bd612636c80281c926c1d3bc4db1b93c Mon Sep 17 00:00:00 2001 From: Ibby Date: Fri, 20 Jan 2017 16:00:05 -0500 Subject: [PATCH] fix(native-geocoder): fix callback order --- src/plugins/native-geocoder.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/native-geocoder.ts b/src/plugins/native-geocoder.ts index c5d0450cff..93d3151e1f 100644 --- a/src/plugins/native-geocoder.ts +++ b/src/plugins/native-geocoder.ts @@ -12,11 +12,13 @@ import { Plugin, Cordova } from './plugin'; * NativeGeocoder.reverseGeocode(52.5072095, 13.1452818) * .then((result: ReverseResult) => console.log("The address is " + result.address + " in " + result.countryCode)) * .catch((error: any) => console.log(error)); - * + * * NativeGeocoder.forwardGeocode("Berlin") * .then((coordinates: ForwardResult) => console.log("The coordinates are latitude=" + coordinates.latitude + " and longitude=" + coordinates.longitude)) * .catch((error: any) => console.log(error)); * ``` + * @interfaces + * */ @Plugin({ name: 'NativeGeocoder', @@ -33,7 +35,9 @@ export class NativeGeocoder { * @param longitude {number} The longitude * @return {Promise} */ - @Cordova() + @Cordova({ + callbackOrder: 'reverse' + }) static reverseGeocode(latitude: number, longitude: number): Promise { return; } /** @@ -41,7 +45,9 @@ export class NativeGeocoder { * @param addressString {string} The address to be geocoded * @return {Promise} */ - @Cordova() + @Cordova({ + callbackOrder: 'reverse' + }) static forwardGeocode(addressString: string): Promise { return; } }