mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(native-geocoder): fix callback order
This commit is contained in:
parent
911537b61b
commit
dbf95ea4bd
@ -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<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static reverseGeocode(latitude: number, longitude: number): Promise<ReverseResult> { return; }
|
||||
|
||||
/**
|
||||
@ -41,7 +45,9 @@ export class NativeGeocoder {
|
||||
* @param addressString {string} The address to be geocoded
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static forwardGeocode(addressString: string): Promise<ForwardResult> { return; }
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user