Follow us on GitHub

com.google.gwt.maps.client.geometrylib
Class SphericalUtils

java.lang.Object
  extended by com.google.gwt.maps.client.geometrylib.SphericalUtils

public class SphericalUtils
extends Object


Constructor Summary
SphericalUtils()
           
 
Method Summary
static double computeArea(JsArray<LatLng> loop)
          Computes the area of the given loop.
static double computeArea(JsArray<LatLng> loop, int radius)
          Computes the area of the given loop.
static double computeArea(MVCArray<LatLng> loop)
          Computes the area of the given loop.
static double computeArea(MVCArray<LatLng> loop, int 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, int 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(JsArray<LatLng> path)
          Computes the length of the given path.
static double computeLength(JsArray<LatLng> path, int radius)
          Computes the length of the given path.
static double computeLength(MVCArray<LatLng> path)
          Computes the length of the given path.
static double computeLength(MVCArray<LatLng> path, int radius)
          Computes the length of the given path.
static LatLng computeOffset(LatLng from, int distance, int heading)
          Computes the LatLng produced by starting from a given LatLng and heading a given distance.
static LatLng computeOffset(LatLng from, int distance, int heading, int radius)
          Computes the LatLng produced by starting from a given LatLng and heading a given distance.
static double computeSignedArea(JsArray<LatLng> loop)
          Computes the signed area of the given loop.
static double computeSignedArea(JsArray<LatLng> loop, int radius)
          Computes the signed area of the given loop.
static double computeSignedArea(MVCArray<LatLng> loop)
          Computes the signed area of the given loop.
static double computeSignedArea(MVCArray<LatLng> loop, int 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

SphericalUtils

public SphericalUtils()
Method Detail

computeArea

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

Parameters:
loop -

computeArea

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

Parameters:
loop -

computeArea

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

Parameters:
loop -
radius -

computeArea

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

Parameters:
loop -
radius -

computeDistanceBetween

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

Parameters:
from -
to -

computeDistanceBetween

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

Parameters:
from -
to -
radius -

computeHeading

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

Parameters:
from -
to -

computeLength

public static final double computeLength(JsArray<LatLng> path)
Computes the length of the given path.

Parameters:
path -

computeLength

public static final double computeLength(MVCArray<LatLng> path)
Computes the length of the given path.

Parameters:
path -

computeLength

public static final double computeLength(JsArray<LatLng> path,
                                         int radius)
Computes the length of the given path.

Parameters:
path -
radius -

computeLength

public static final double computeLength(MVCArray<LatLng> path,
                                         int radius)
Computes the length of the given path.

Parameters:
path -
radius -

computeOffset

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

Parameters:
from -
distance -
heading -

computeOffset

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

Parameters:
from -
distance -
heading -
radius -

computeSignedArea

public static final double computeSignedArea(JsArray<LatLng> 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.

Parameters:
loop -

computeSignedArea

public static final double computeSignedArea(MVCArray<LatLng> 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.

Parameters:
loop -

computeSignedArea

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

Parameters:
loop -
radius -

computeSignedArea

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

Parameters:
loop -
radius -

interpolate

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

Parameters:
from -
to -
fraction -


Follow us on GitHub

Copyright © 2011-2012 Gone Vertical LLC. All Rights Reserved.