fix(googlemaps): able to pass array of LatLng to GoogleMapsLatLngBounds constructor

closes #298
This commit is contained in:
Ibby Hadeed 2016-07-17 02:49:44 -04:00
parent e55c0c3e15
commit de14b0ea15

View File

@ -951,8 +951,9 @@ export class GoogleMapsKmlOverlay {
export class GoogleMapsLatLngBounds { export class GoogleMapsLatLngBounds {
private _objectInstance: any; private _objectInstance: any;
constructor(public southwest: GoogleMapsLatLng, public northeast: GoogleMapsLatLng) { constructor(public southwestOrArrayOfLatLng: GoogleMapsLatLng|GoogleMapsLatLng[], public northeast?: GoogleMapsLatLng) {
this._objectInstance = new plugin.google.maps.LatLngBounds([southwest, northeast]); let args = !!northeast ? [southwestOrArrayOfLatLng, northeast] : southwestOrArrayOfLatLng;
this._objectInstance = new plugin.google.maps.LatLngBounds(args);
} }
@CordovaInstance({ sync: true }) @CordovaInstance({ sync: true })