Class Index | File Index

Classes


Class geo.Point


Defined in: extensions.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
geo.Point(src)
Creates a new point from the given parameters.
Method Summary
Method Attributes Method Name and Description
 
The point's altitude, in meters.
 
The point's altitude mode.
 
destination(options)
Calculates the destination point along a geodesic, given an initial heading and distance, starting at this point.
 
distance(dest)
Returns the approximate sea level great circle (Earth) distance between this point and the destination point using the Haversine formula and assuming an Earth radius of geo.math.EARTH_RADIUS.
 
equals(otherPoint)
Determines whether or not the given point is the same as this one.
 
Returns the 2D (no altitude) version of this point.
<static>  
geo.Point.fromCartesian(cartesianVector)
A static method to create a point from a 3-vector representing the cartesian coordinates of a point on the Earth, assuming a spherical Earth of radius geo.math.EARTH_RADIUS.
 
heading(dest)
Calculates the initial heading/bearing at which an object at the start point will need to travel to get to the destination point.
 
is3D()
Determines whether or not this point has an altitude component.
 
lat()
The point's latitude, in degrees.
 
lng()
The point's longitude, in degrees.
 
midpoint(dest, fraction)
Calculates an intermediate point on the geodesic between this point and the given destination point.
 
Returns the cartesian representation of the point, as a 3-vector, assuming a spherical Earth of radius geo.math.EARTH_RADIUS.
 
Returns the string representation of the point.
Class Detail
geo.Point(src)
Creates a new point from the given parameters.
Parameters:
{geo.Point|Number[]|KmlPoint|KmlLookAt|KmlCoord|KmlLocation|GLatLng} src
The point data.
Method Detail
{Number} altitude()
The point's altitude, in meters.

{KmlAltitudeModeEnum} altitudeMode()
The point's altitude mode.

{geo.Point} destination(options)
Calculates the destination point along a geodesic, given an initial heading and distance, starting at this point.
Parameters:
{Object} options
The heading and distance object literal.
{Number} options.heading
The initial heading, in degrees.
{Number} options.distance
The distance along the geodesic, in meters.
Returns:
{geo.Point}
See:
geo.math.destination

{Number} distance(dest)
Returns the approximate sea level great circle (Earth) distance between this point and the destination point using the Haversine formula and assuming an Earth radius of geo.math.EARTH_RADIUS.
Parameters:
{geo.Point} dest
The destination point.
Returns:
{Number} The distance, in meters, to the destination point.
See:
geo.math.distance

{Boolean} equals(otherPoint)
Determines whether or not the given point is the same as this one.
Parameters:
{geo.Point} otherPoint
The other point.

{geo.Point} flatten()
Returns the 2D (no altitude) version of this point.

<static> {geo.Point} geo.Point.fromCartesian(cartesianVector)
A static method to create a point from a 3-vector representing the cartesian coordinates of a point on the Earth, assuming a spherical Earth of radius geo.math.EARTH_RADIUS.
Parameters:
{geo.linalg.Vector} cartesianVector
The cartesian representation of the point to create.
Returns:
{geo.Point} The point, or null if the point doesn't exist.

{Number} heading(dest)
Calculates the initial heading/bearing at which an object at the start point will need to travel to get to the destination point.
Parameters:
{geo.Point} dest
The destination point.
Returns:
{Number} The initial heading required to get to the destination point, in the [0,360) degree range.
See:
geo.math.heading

{Boolean} is3D()
Determines whether or not this point has an altitude component.

{Number} lat()
The point's latitude, in degrees.

{Number} lng()
The point's longitude, in degrees.

{geo.Point} midpoint(dest, fraction)
Calculates an intermediate point on the geodesic between this point and the given destination point.
Parameters:
{geo.Point} dest
The destination point.
{Number} fraction Optional
The fraction of distance between the first and second points.
Returns:
{geo.Point}
See:
geo.math.midpoint

{geo.linalg.Vector} toCartesian()
Returns the cartesian representation of the point, as a 3-vector, assuming a spherical Earth of radius geo.math.EARTH_RADIUS.
Returns:
{geo.linalg.Vector}

{String} toString()
Returns the string representation of the point.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 30 2012 11:34:31 GMT-0700 (PDT)