Skip to content

Commit

Permalink
fix(native-geocoder): fix callback order
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Jan 20, 2017
1 parent 911537b commit dbf95ea
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/plugins/native-geocoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -33,15 +35,19 @@ export class NativeGeocoder {
* @param longitude {number} The longitude
* @return {Promise<any>}
*/
@Cordova()
@Cordova({
callbackOrder: 'reverse'
})
static reverseGeocode(latitude: number, longitude: number): Promise<ReverseResult> { return; }

/**
* Forward geocode a given address to find coordinates
* @param addressString {string} The address to be geocoded
* @return {Promise<any>}
*/
@Cordova()
@Cordova({
callbackOrder: 'reverse'
})
static forwardGeocode(addressString: string): Promise<ForwardResult> { return; }

}
Expand Down

0 comments on commit dbf95ea

Please sign in to comment.