From 72a694a5e1a61d8743e742ebe7431bafd3f0ed4d Mon Sep 17 00:00:00 2001 From: Ibby Date: Wed, 5 Oct 2016 20:43:57 -0400 Subject: [PATCH] fix(googlemaps): add missing properties should fix #642 --- src/plugins/googlemaps.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/googlemaps.ts b/src/plugins/googlemaps.ts index 86cdb96e3..19d095e65 100644 --- a/src/plugins/googlemaps.ts +++ b/src/plugins/googlemaps.ts @@ -1,4 +1,4 @@ -import { Cordova, CordovaInstance, Plugin } from './plugin'; +import {Cordova, CordovaInstance, Plugin, InstanceProperty} from './plugin'; import { Observable } from 'rxjs/Observable'; @@ -851,7 +851,10 @@ export class GoogleMapsKmlOverlay { export class GoogleMapsLatLngBounds { private _objectInstance: any; - constructor(public southwestOrArrayOfLatLng: GoogleMapsLatLng | GoogleMapsLatLng[], public northeast?: GoogleMapsLatLng) { + @InstanceProperty get northeast(): GoogleMapsLatLng { return; } + @InstanceProperty get southwest(): GoogleMapsLatLng { return; } + + constructor(southwestOrArrayOfLatLng: GoogleMapsLatLng | GoogleMapsLatLng[], northeast?: GoogleMapsLatLng) { let args = !!northeast ? [southwestOrArrayOfLatLng, northeast] : southwestOrArrayOfLatLng; this._objectInstance = new plugin.google.maps.LatLngBounds(args); } @@ -878,7 +881,10 @@ export class GoogleMapsLatLngBounds { export class GoogleMapsLatLng { private _objectInstance: any; - constructor(public lat: number, public lng: number) { + @InstanceProperty get lat(): number { return; } + @InstanceProperty get lng(): number { return; } + + constructor(lat: number, lng: number) { this._objectInstance = new plugin.google.maps.LatLng(lat, lng); }