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

com.google.maps.gwt.client.geometry.Spherical 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.geometry;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.maps.gwt.client.LatLng;
import com.google.maps.gwt.client.MVCArray;

/**
 * Utility functions for computing geodesic angles, distances and areas.
 * The default radius is Earth's radius of 6378137 meters.
 *
 * THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
 */
public class Spherical extends JavaScriptObject {

  /**
   * Computes the area of the given loop. Loops must be closed.
   */ 
  public static final native double computeArea(JsArray loop, double radius)/*-{
    return $wnd.google.maps.geometry.spherical.computeArea(loop, radius);

  }-*/;

  /**
   * Computes the area of the given loop. Loops must be closed.
   */ 
  public static final native double computeArea(JsArray loop)/*-{
    return $wnd.google.maps.geometry.spherical.computeArea(loop);

  }-*/;

  /**
   * Computes the area of the given loop. Loops must be closed.
   */ 
  public static final native double computeArea(MVCArray loop, double radius)/*-{
    return $wnd.google.maps.geometry.spherical.computeArea(loop, radius);

  }-*/;

  /**
   * Computes the area of the given loop. Loops must be closed.
   */ 
  public static final native double computeArea(MVCArray loop)/*-{
    return $wnd.google.maps.geometry.spherical.computeArea(loop);

  }-*/;

  /**
   * Computes the distance between two LatLngs.
   */ 
  public static final native double computeDistanceBetween(LatLng from, LatLng to, double radius)/*-{
    return $wnd.google.maps.geometry.spherical.computeDistanceBetween(from, to, radius);

  }-*/;

  /**
   * Computes the distance between two LatLngs.
   */ 
  public static final native double computeDistanceBetween(LatLng from, LatLng to)/*-{
    return $wnd.google.maps.geometry.spherical.computeDistanceBetween(from, to);

  }-*/;

  /**
   * Computes the heading from one LatLng to another LatLng.
   */ 
  public static final native double computeHeading(LatLng from, LatLng to)/*-{
    return $wnd.google.maps.geometry.spherical.computeHeading(from, to);

  }-*/;

  /**
   * Computes the length of the given path.
   */ 
  public static final native double computeLength(JsArray path, double radius)/*-{
    return $wnd.google.maps.geometry.spherical.computeLength(path, radius);

  }-*/;

  /**
   * Computes the length of the given path.
   */ 
  public static final native double computeLength(JsArray path)/*-{
    return $wnd.google.maps.geometry.spherical.computeLength(path);

  }-*/;

  /**
   * Computes the length of the given path.
   */ 
  public static final native double computeLength(MVCArray path, double radius)/*-{
    return $wnd.google.maps.geometry.spherical.computeLength(path, radius);

  }-*/;

  /**
   * Computes the length of the given path.
   */ 
  public static final native double computeLength(MVCArray path)/*-{
    return $wnd.google.maps.geometry.spherical.computeLength(path);

  }-*/;

  /**
   * Computes the LatLng produced by starting from a given LatLng and
   * heading a given distance.
   */ 
  public static final native LatLng computeOffset(LatLng from, double distance, double heading, double radius)/*-{
    return $wnd.google.maps.geometry.spherical.computeOffset(from, distance, heading, radius);

  }-*/;

  /**
   * Computes the LatLng produced by starting from a given LatLng and
   * heading a given distance.
   */ 
  public static final native LatLng computeOffset(LatLng from, double distance, double heading)/*-{
    return $wnd.google.maps.geometry.spherical.computeOffset(from, distance, heading);

  }-*/;

  /**
   * Computes the signed area of the given loop. Loops must be closed. The
   * signed area may be used to determine the orientation of a loop.
   */ 
  public static final native double computeSignedArea(JsArray loop, double radius)/*-{
    return $wnd.google.maps.geometry.spherical.computeSignedArea(loop, radius);

  }-*/;

  /**
   * Computes the signed area of the given loop. Loops must be closed. The
   * signed area may be used to determine the orientation of a loop.
   */ 
  public static final native double computeSignedArea(JsArray loop)/*-{
    return $wnd.google.maps.geometry.spherical.computeSignedArea(loop);

  }-*/;

  /**
   * Computes the signed area of the given loop. Loops must be closed. The
   * signed area may be used to determine the orientation of a loop.
   */ 
  public static final native double computeSignedArea(MVCArray loop, double radius)/*-{
    return $wnd.google.maps.geometry.spherical.computeSignedArea(loop, radius);

  }-*/;

  /**
   * Computes the signed area of the given loop. Loops must be closed. The
   * signed area may be used to determine the orientation of a loop.
   */ 
  public static final native double computeSignedArea(MVCArray loop)/*-{
    return $wnd.google.maps.geometry.spherical.computeSignedArea(loop);

  }-*/;

  /**
   * Travels a fraction of the way from one LatLng to another LatLng.
   */ 
  public static final native LatLng interpolate(LatLng from, LatLng to, double fraction)/*-{
    return $wnd.google.maps.geometry.spherical.interpolate(from, to, fraction);

  }-*/;


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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy