Class: LonLat

og/LonLat.LonLat

Represents a geographical point with a certain latitude, longitude and height.

new module:og/LonLat.LonLat(lon, lat, height)

Name Type Description
lon number optional Longitude.
lat number optional Latitude.
height number optional Height over the surface.

Members

heightnumber

Height.

latnumber

Latitude.

lonnumber

Longitude.

Methods

staticmodule:og/LonLat.LonLat.createFromArray(arr){LonLat}

Creates an object by coordinate array.
Name Type Description
arr Array.<number> Coordiante array, where first is longitude, second is latitude and third is a height. (exactly 3 entries)
Returns:
Type Description
LonLat -

staticmodule:og/LonLat.LonLat.forwardMercator(lon, lat, height){LonLat}

Converts degrees to mercator coordinates.
Name Type Description
lon number Degrees longitude.
lat number Degrees latitude.
height number optional Height.
Returns:
Type Description
LonLat -

staticmodule:og/LonLat.LonLat.inverseMercator(x, y, height){LonLat}

Converts mercator to degrees coordinates.
Name Type Description
x number Mercator longitude.
y number Mercator latitude.
height number optional Height.
Returns:
Type Description
LonLat -

staticmodule:og/LonLat.LonLat.join()

Creates coordinates array.

clone(){LonLat}

Clone the coordiante.
Returns:
Type Description
LonLat -

copy(lonLat){LonLat}

Copy coordinates.
Name Type Description
lonLat LonLat optional Coordinates to copy.
Returns:
Type Description
LonLat -

equal(b){boolean}

Compares coordinates.
Name Type Description
b LonLat Coordinate to compare with.
Returns:
Type Description
boolean -

forwardMercator(){LonLat}

Converts to mercator coordinates.
Returns:
Type Description
LonLat -

inverseMercator(){LonLat}

Converts from mercator coordinates.
Returns:
Type Description
LonLat -

set(lon, lat, height){LonLat}

Sets coordinates.
Name Type Description
lon number optional Longitude.
lat number optional Latitude.
height number optional Height.
Returns:
Type Description
LonLat -