Skip to content

Commit

Permalink
fix(googlemaps): able to pass array of LatLng to GoogleMapsLatLngBoun…
Browse files Browse the repository at this point in the history
…ds constructor

closes #298
  • Loading branch information
ihadeed committed Jul 17, 2016
1 parent e55c0c3 commit de14b0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/googlemaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit de14b0e

Please sign in to comment.