mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
refractor(native-geocoder): refractor interface names
This commit is contained in:
parent
dbf95ea4bd
commit
d746a98ef4
@ -7,14 +7,14 @@ import { Plugin, Cordova } from './plugin';
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { NativeGeocoder } from 'ionic-native';
|
||||
* import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderForwardResult } from 'ionic-native';
|
||||
*
|
||||
* NativeGeocoder.reverseGeocode(52.5072095, 13.1452818)
|
||||
* .then((result: ReverseResult) => console.log("The address is " + result.address + " in " + result.countryCode))
|
||||
* .then((result: NativeGeocoderReverseResult) => 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))
|
||||
* .then((coordinates: NativeGeocoderForwardResult) => console.log("The coordinates are latitude=" + coordinates.latitude + " and longitude=" + coordinates.longitude))
|
||||
* .catch((error: any) => console.log(error));
|
||||
* ```
|
||||
* @interfaces
|
||||
@ -38,7 +38,7 @@ export class NativeGeocoder {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static reverseGeocode(latitude: number, longitude: number): Promise<ReverseResult> { return; }
|
||||
static reverseGeocode(latitude: number, longitude: number): Promise<NativeGeocoderReverseResult> { return; }
|
||||
|
||||
/**
|
||||
* Forward geocode a given address to find coordinates
|
||||
@ -48,14 +48,14 @@ export class NativeGeocoder {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
static forwardGeocode(addressString: string): Promise<ForwardResult> { return; }
|
||||
static forwardGeocode(addressString: string): Promise<NativeGeocoderForwardResult> { return; }
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Encapsulates format information about a reverse geocoding result.
|
||||
*/
|
||||
export interface ReverseResult {
|
||||
export interface NativeGeocoderReverseResult {
|
||||
/**
|
||||
* The street.
|
||||
*/
|
||||
@ -84,7 +84,7 @@ export interface ReverseResult {
|
||||
/**
|
||||
* Encapsulates format information about a forward geocoding result.
|
||||
*/
|
||||
export interface ForwardResult {
|
||||
export interface NativeGeocoderForwardResult {
|
||||
/**
|
||||
* The latitude.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user