mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
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 {
|
||||
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 })
|
||||
|
Loading…
Reference in New Issue
Block a user