refractor(native-geocoder): refractor interface names

This commit is contained in:
Ibby 2017-01-20 16:01:29 -05:00
parent dbf95ea4bd
commit d746a98ef4

View File

@ -7,14 +7,14 @@ import { Plugin, Cordova } from './plugin';
* *
* @usage * @usage
* ```typescript * ```typescript
* import { NativeGeocoder } from 'ionic-native'; * import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderForwardResult } from 'ionic-native';
* *
* NativeGeocoder.reverseGeocode(52.5072095, 13.1452818) * 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)); * .catch((error: any) => console.log(error));
* *
* NativeGeocoder.forwardGeocode("Berlin") * 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)); * .catch((error: any) => console.log(error));
* ``` * ```
* @interfaces * @interfaces
@ -38,7 +38,7 @@ export class NativeGeocoder {
@Cordova({ @Cordova({
callbackOrder: 'reverse' 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 * Forward geocode a given address to find coordinates
@ -48,14 +48,14 @@ export class NativeGeocoder {
@Cordova({ @Cordova({
callbackOrder: 'reverse' callbackOrder: 'reverse'
}) })
static forwardGeocode(addressString: string): Promise<ForwardResult> { return; } static forwardGeocode(addressString: string): Promise<NativeGeocoderForwardResult> { return; }
} }
/** /**
* Encapsulates format information about a reverse geocoding result. * Encapsulates format information about a reverse geocoding result.
*/ */
export interface ReverseResult { export interface NativeGeocoderReverseResult {
/** /**
* The street. * The street.
*/ */
@ -84,7 +84,7 @@ export interface ReverseResult {
/** /**
* Encapsulates format information about a forward geocoding result. * Encapsulates format information about a forward geocoding result.
*/ */
export interface ForwardResult { export interface NativeGeocoderForwardResult {
/** /**
* The latitude. * The latitude.
*/ */