fix(googlemaps): able to pass array of LatLng to GoogleMapsLatLngBounds constructor
closes #298
This commit is contained in:
parent
e55c0c3e15
commit
de14b0ea15
@ -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 })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user