com.google.maps.gwt.client.geometry
Class Spherical

java.lang.Object
  extended by JavaScriptObject
      extended by com.google.maps.gwt.client.geometry.Spherical

public class Spherical
extends JavaScriptObject

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


Constructor Summary
protected Spherical()
          Protected constructor avoids default public constructor.
 
Method Summary
static double computeArea( loop)
          Computes the area of the given loop.
static double computeArea( loop, double radius)
          Computes the area of the given loop.
static double computeDistanceBetween(LatLng from, LatLng to)
          Computes the distance between two LatLngs.
static double computeDistanceBetween(LatLng from, LatLng to, double radius)
          Computes the distance between two LatLngs.
static double computeHeading(LatLng from, LatLng to)
          Computes the heading from one LatLng to another LatLng.
static double computeLength( path)
          Computes the length of the given path.
static double computeLength( path, double radius)
          Computes the length of the given path.
static LatLng computeOffset(LatLng from, double distance, double heading)
          Computes the LatLng produced by starting from a given LatLng and heading a given distance.
static LatLng computeOffset(LatLng from, double distance, double heading, double radius)
          Computes the LatLng produced by starting from a given LatLng and heading a given distance.
static double computeSignedArea( loop)
          Computes the signed area of the given loop.
static double computeSignedArea( loop, double radius)
          Computes the signed area of the given loop.
static LatLng interpolate(LatLng from, LatLng to, double fraction)
          Travels a fraction of the way from one LatLng to another LatLng.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spherical

protected Spherical()
Protected constructor avoids default public constructor.

Method Detail

computeArea

public static final double computeArea( loop,
                                       double radius)
Computes the area of the given loop. Loops must be closed.


computeArea

public static final double computeArea( loop)
Computes the area of the given loop. Loops must be closed.


computeDistanceBetween

public static final double computeDistanceBetween(LatLng from,
                                                  LatLng to,
                                                  double radius)
Computes the distance between two LatLngs.


computeDistanceBetween

public static final double computeDistanceBetween(LatLng from,
                                                  LatLng to)
Computes the distance between two LatLngs.


computeHeading

public static final double computeHeading(LatLng from,
                                          LatLng to)
Computes the heading from one LatLng to another LatLng.


computeLength

public static final double computeLength( path,
                                         double radius)
Computes the length of the given path.


computeLength

public static final double computeLength( path)
Computes the length of the given path.


computeOffset

public static final LatLng computeOffset(LatLng from,
                                         double distance,
                                         double heading,
                                         double radius)
Computes the LatLng produced by starting from a given LatLng and heading a given distance.


computeOffset

public static final LatLng computeOffset(LatLng from,
                                         double distance,
                                         double heading)
Computes the LatLng produced by starting from a given LatLng and heading a given distance.


computeSignedArea

public static final double computeSignedArea( loop,
                                             double 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.


computeSignedArea

public static final double 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.


interpolate

public static final LatLng interpolate(LatLng from,
                                       LatLng to,
                                       double fraction)
Travels a fraction of the way from one LatLng to another LatLng.