From 02a658321a4c061bb47dbf31c477b6e587389273 Mon Sep 17 00:00:00 2001 From: Guille Date: Fri, 3 Jun 2016 11:31:54 +0200 Subject: [PATCH 1/4] lat/lng string->number --- src/plugins/googlemaps.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/googlemaps.ts b/src/plugins/googlemaps.ts index 63e62d79d..ac8a990eb 100644 --- a/src/plugins/googlemaps.ts +++ b/src/plugins/googlemaps.ts @@ -989,7 +989,7 @@ export class GoogleMapsKmlOverlay { export class GoogleMapsLatLng { private _objectInstance: any; - constructor(public lat: string, public lng: string) { + constructor(public lat: number, public lng: number) { this._objectInstance = new plugin.google.maps.LatLng(lat, lng); } From d40f8d868a4be6200385939aee534e3a4bfb5eff Mon Sep 17 00:00:00 2001 From: Guille Date: Fri, 3 Jun 2016 11:32:55 +0200 Subject: [PATCH 2/4] Update interfaces to use GoogleMapsLatLng instead of Lat / Lng --- src/plugins/googlemaps.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/plugins/googlemaps.ts b/src/plugins/googlemaps.ts index ac8a990eb..5e6c2ac9b 100644 --- a/src/plugins/googlemaps.ts +++ b/src/plugins/googlemaps.ts @@ -352,26 +352,20 @@ export class GoogleMap { } export interface AnimateCameraOptions { - target?: string; + target?: GoogleMapsLatLng; tilt?: number; zoom?: number; bearing?: number; duration?: number; } export interface CameraPosition { - target?: { - lat?: string; - lng?: string; - }; + target?: GoogleMapsLatLng; zoom?: number; tilt?: number; bearing?: number; } export interface MyLocation { - latLng?: { - lat?: string; - lng?: string; - }; + latLng?: GoogleMapsLatLng; speed?: number; time?: string; bearing?: number; From d715d6a118dacb14db8036b6775979bbf96b4613 Mon Sep 17 00:00:00 2001 From: Guille Date: Fri, 3 Jun 2016 11:33:42 +0200 Subject: [PATCH 3/4] Update animateCamera parameter --- src/plugins/googlemaps.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/googlemaps.ts b/src/plugins/googlemaps.ts index 5e6c2ac9b..2900196a2 100644 --- a/src/plugins/googlemaps.ts +++ b/src/plugins/googlemaps.ts @@ -165,7 +165,7 @@ export class GoogleMap { @CordovaInstance({ sync: true }) - animateCamera(cameraPosition: CameraPosition): void { + animateCamera(animateCameraOptions: AnimateCameraOptions): void { } @CordovaInstance({ From 82cfe33d8644eb33b157d162933fc09d1a0212c8 Mon Sep 17 00:00:00 2001 From: Guille Date: Fri, 3 Jun 2016 11:34:15 +0200 Subject: [PATCH 4/4] Update docs GoogleMaps -> GoogleMap --- src/plugins/googlemaps.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/googlemaps.ts b/src/plugins/googlemaps.ts index 2900196a2..128040a10 100644 --- a/src/plugins/googlemaps.ts +++ b/src/plugins/googlemaps.ts @@ -38,12 +38,12 @@ export const GoogleMapsAnimation = { * @description This plugin uses the native Google Maps SDK * @usage * ``` - * import {GoogleMaps, GoogleMapsEvent} from 'ionic-native'; + * import {GoogleMap, GoogleMapsEvent} from 'ionic-native'; * * ... * * // somewhere in your component - * let map = new GoogleMaps('elementID'); + * let map = new GoogleMap('elementID'); * * map.on(GoogleMapsEvent.MAP_READY).subscribe(() => console.log("Map is ready!")); * ```