Top Fields Constructors Methods
com.dlsc.gmapsfx.javascript.object

public Class LatLong

extends JavascriptObject
Class Inheritance
Imports
com.dlsc.gmapsfx.javascript.JavascriptObject, netscape.javascript.JSObject

Author
Rob Terpilowski

Field Summary

Modifier and TypeField and Description
public static final double
Inherited from com.dlsc.gmapsfx.javascript.JavascriptObject:
jsObjectobjectCounterpeerRegistryruntimevariableName

Constructor Summary

AccessConstructor and Description
public
LatLong(double latitude, double longitude)

public
LatLong(JSObject jsObject)
References Deprecated JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

The distance, in metres, to the end point.
distanceFrom
(LatLong
The end point to calculate the distance to.
end
)

From v3_epoly.js, calculates the distance between this LatLong point and another.

public double

Returns:

The bearing, in degrees, of the supplied point from this point.
getBearing
(LatLong
The point that the bearing is calculated for.
end
)

Calculates the bearing, in degrees, of the end LatLong point from this LatLong point.

public LatLong

Returns:

A new LatLong indicating the end point.
getDestinationPoint
(double
The bearing, in degrees, with North as 0, East as 90 etc.
bearing
,
double
The distance in metres.
distance
)

Calculates the LatLong position of the end point of a line the specified distance from this LatLong, along the provided bearing, where North is 0, East is 90 etc.

public double
public double
public double

Returns:

The latitude value of this LatLong, as radians.
latToRadians
()

Convenience method to convert the latitude of this LatLong to radians.

public double

Returns:

The longitude of this LatLong, as radians.
longToRadians
()

Convenience method to convert the longitude of this LatLong to radians.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from com.dlsc.gmapsfx.javascript.JavascriptObject:
checkBooleancheckIntegercheckUndefinedgetJSObjectgetNextVariableNamegetPropertygetPropertygetVariableNameinvokeJavascriptinvokeJavascriptinvokeJavascriptReturnValueinvokeJavascriptReturnValueisMemberDefinedsetPropertysetPropertysetProperty

Field Detail

EarthRadiusMetersback to summary
public static final double EarthRadiusMeters

Constructor Detail

LatLongback to summary
public LatLong(double latitude, double longitude)
LatLongback to summary
public LatLong(JSObject jsObject)

References Deprecated

JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Method Detail

distanceFromback to summary
public double distanceFrom(LatLong end)

From v3_epoly.js, calculates the distance between this LatLong point and another.

Parameters
end:LatLong

The end point to calculate the distance to.

Returns:double

The distance, in metres, to the end point.

getBearingback to summary
public double getBearing(LatLong end)

Calculates the bearing, in degrees, of the end LatLong point from this LatLong point.

Parameters
end:LatLong

The point that the bearing is calculated for.

Returns:double

The bearing, in degrees, of the supplied point from this point.

getDestinationPointback to summary
public LatLong getDestinationPoint(double bearing, double distance)

Calculates the LatLong position of the end point of a line the specified distance from this LatLong, along the provided bearing, where North is 0, East is 90 etc.

Parameters
bearing:double

The bearing, in degrees, with North as 0, East as 90 etc.

distance:double

The distance in metres.

Returns:LatLong

A new LatLong indicating the end point.

getLatitudeback to summary
public double getLatitude()
getLongitudeback to summary
public double getLongitude()
latToRadiansback to summary
public double latToRadians()

Convenience method to convert the latitude of this LatLong to radians.

Returns:double

The latitude value of this LatLong, as radians.

longToRadiansback to summary
public double longToRadians()

Convenience method to convert the longitude of this LatLong to radians.

Returns:double

The longitude of this LatLong, as radians.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override