ng2-ui / map

Angular Google Maps Directives
https://ng2-ui.github.io/map
260 stars 98 forks source link

Error: fitBounds: latLngBounds must be of type LatLngBounds. #290

Open andrzej-wisla opened 5 years ago

andrzej-wisla commented 5 years ago

Sometimes I receive this error, what does it means? Where I can add type to latLngBounds.

setViewport() {
    const sw = new google.maps.LatLng(this.places.viewportSwLat, this.places.viewportSwLng;
    const ne = new google.maps.LatLng(this.places.viewportNeLat, this.places.viewportNeLng;

    this.map.fitBounds(new google.maps.LatLngBounds(sw, ne));
  }