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 {
private _objectInstance: any;
constructor(public southwest: GoogleMapsLatLng, public northeast: GoogleMapsLatLng) {
this._objectInstance = new plugin.google.maps.LatLngBounds([southwest, northeast]);
constructor(public southwestOrArrayOfLatLng: GoogleMapsLatLng|GoogleMapsLatLng[], public northeast?: GoogleMapsLatLng) {
let args = !!northeast ? [southwestOrArrayOfLatLng, northeast] : southwestOrArrayOfLatLng;
this._objectInstance = new plugin.google.maps.LatLngBounds(args);
}
@CordovaInstance({ sync: true })