All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.maps.gwt.client.LatLngBounds Maven / Gradle / Ivy

/*
 * Copyright 2011 The Google Web Toolkit Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.maps.gwt.client;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * A 
 * LatLngBounds
 * 
 * instance represents a rectangle in geographical coordinates,
 * including one that crosses the 180 degrees longitudinal meridian.
 *
 * THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
 */
public class LatLngBounds extends JavaScriptObject {

  /**
   * Constructs a rectangle from the points at its south-west and north-east corners.
   */ 
  public static native LatLngBounds create(LatLng sw, LatLng ne)/*-{
    return new $wnd.google.maps.LatLngBounds(sw, ne);
  }-*/;

  /**
   * Constructs a rectangle from the points at its south-west and north-east corners.
   */ 
  public static native LatLngBounds create(LatLng sw)/*-{
    return new $wnd.google.maps.LatLngBounds(sw);
  }-*/;

  /**
   * Constructs a rectangle from the points at its south-west and north-east corners.
   */ 
  public static native LatLngBounds create()/*-{
    return new $wnd.google.maps.LatLngBounds();
  }-*/;


  /**
   * Protected constructor avoids default public constructor.
   */
  protected LatLngBounds() {
    /* Java constructor is protected, */
  }

  /**
   * Returns true if the given lat/lng is in this bounds.
   */ 
  public final native boolean contains(LatLng latLng)/*-{
    return this.contains(latLng);

  }-*/;

  /**
   * Returns true if this bounds approximately equals the given bounds.
   */ 
  public final native boolean equals(LatLngBounds other)/*-{
    return this.equals(other);

  }-*/;

  /**
   * Extends this bounds to contain the given point.
   */ 
  public final native LatLngBounds extend(LatLng point)/*-{
    return this.extend(point);

  }-*/;

  /**
   * Computes the center of this LatLngBounds
   */ 
  public final native LatLng getCenter()/*-{
    return this.getCenter();

  }-*/;

  /**
   * Returns the north-east corner of this bounds.
   */ 
  public final native LatLng getNorthEast()/*-{
    return this.getNorthEast();

  }-*/;

  /**
   * Returns the south-west corner of this bounds.
   */ 
  public final native LatLng getSouthWest()/*-{
    return this.getSouthWest();

  }-*/;

  /**
   * Returns true if this bounds shares any points with this bounds.
   */ 
  public final native boolean intersects(LatLngBounds other)/*-{
    return this.intersects(other);

  }-*/;

  /**
   * Returns if the bounds are empty.
   */ 
  public final native boolean isEmpty()/*-{
    return this.isEmpty();

  }-*/;

  /**
   * Converts the given map bounds to a lat/lng span.
   */ 
  public final native LatLng toSpan()/*-{
    return this.toSpan();

  }-*/;

  /**
   * Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this
   * bounds, where "lo" corresponds to the southwest corner of the
   * bounding box, while "hi" corresponds to the northeast corner of that
   * box.
   */ 
  public final native String toUrlValue(double precision)/*-{
    return this.toUrlValue(precision);

  }-*/;

  /**
   * Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this
   * bounds, where "lo" corresponds to the southwest corner of the
   * bounding box, while "hi" corresponds to the northeast corner of that
   * box.
   */ 
  public final native String toUrlValue()/*-{
    return this.toUrlValue();

  }-*/;

  /**
   * Extends this bounds to contain the union of this and the given bounds.
   */ 
  public final native LatLngBounds union(LatLngBounds other)/*-{
    return this.union(other);

  }-*/;

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy