addon/components/google-map.js
function () {
    var map, bounds, coords;
    if (this.isDestroying || this.isDestroyed) {
      return;
    }
    map = this.get('googleObject');
    if (this._state !== 'inDOM' || !map) {
      this._scheduleAutoFitBounds(coords);
      return;
    }
    coords = this.get('fitBoundsArray');
    if (!coords) {
      return;
    }
    if (Ember.isArray(coords)) {
      // it's an array of lat,lng
      coords = coords.slice();
      if (get$(coords, 'length')) {
        bounds = new google.maps.LatLngBounds(helpers._latLngToGoogle(coords.shift()));
        forEach(coords, function (point) {
          bounds.extend(helpers._latLngToGoogle(point));
        });
      }
      else {
        return;
      }
    }
    else {
      // it's a bound object
      bounds = helpers._boundsToGoogle(coords);
    }
    if (bounds) {
      // finally make our map to fit
      map.fitBounds(bounds);
    }
  }
function () {
    var map, bounds, coords;
    if (this.isDestroying || this.isDestroyed) {
      return;
    }
    map = this.get('googleObject');
    if (this._state !== 'inDOM' || !map) {
      this._scheduleAutoFitBounds(coords);
      return;
    }
    coords = this.get('fitBoundsArray');
    if (!coords) {
      return;
    }
    if (Ember.isArray(coords)) {
      // it's an array of lat,lng
      coords = coords.slice();
      if (get$(coords, 'length')) {
        bounds = new google.maps.LatLngBounds(helpers._latLngToGoogle(coords.shift()));
        forEach(coords, function (point) {
          bounds.extend(helpers._latLngToGoogle(point));
        });
      }
      else {
        return;
      }
    }
    else {
      // it's a bound object
      bounds = helpers._boundsToGoogle(coords);
    }
    if (bounds) {
      // finally make our map to fit
      map.fitBounds(bounds);
    }
  }
function ( ) { var map , bounds , coords ; if ( this . isDestroying || this . isDestroyed ) { return ; } map = this . get ( 'googleObject' ) ; if ( this . _state !== 'inDOM' || ! map ) { this . _scheduleAutoFitBounds ( coords ) ; return ; } coords = this . get ( 'fitBoundsArray' ) ; if ( ! coords ) { return ; } if ( Ember . isArray ( coords ) ) { // it's an array of lat,lng coords = coords . slice ( ) ; if ( get$ ( coords , 'length' ) ) { bounds = new google . maps . LatLngBounds ( helpers . _latLngToGoogle ( coords . shift ( ) ) ) ; forEach ( coords , function ( point ) { bounds . extend ( helpers . _latLngToGoogle ( point ) ) ; } ) ; } else { return ; } } else { // it's a bound object bounds = helpers . _boundsToGoogle ( coords ) ; } if ( bounds ) { // finally make our map to fit map . fitBounds ( bounds ) ; } }
Fit the bounds to contain given coordinates

@method _fitBounds
Fit the bounds to contain given coordinates