EMAPI.LonLat

A class representing the geographic coordinates in the form of latitude and longitude.

Summary
EMAPI.LonLatA class representing the geographic coordinates in the form of latitude and longitude.
Properties
lon{Float} Longitude (coordinate x).
lat{Float} Latitude (coordinate y).
Functions
EMAPI.LonLatThe constructor of a new instance of geographic point.
toStringReturns the coordinates in a text form.
toShortStringReturns the rectangle coordinates in the simplified text form.
cloneCreates a copy of the geographical point.
addCreates a copy of the geographical point with coordinates shifted by given values.
equalsCompares two geographical points, the current one with the one passed in a parameter.
fromStringAn alternative method constructing EMAPI.LonLat class objects basing on coordinates in a text form.

Properties

lon

{Float} Longitude (coordinate x).

lat

{Float} Latitude (coordinate y).

Functions

EMAPI.LonLat

The constructor of a new instance of geographic point.

Parameters

lon{Float} Longitude (coordinate x).
lat{Float} Latitude (coordinate y).

toString

toString: function ()

Returns the coordinates in a text form.

Result

{String} Text representation EMAPI.LonLat object (i.a.  “lon=5,lat=42”).

toShortString

toShortString:function()

Returns the rectangle coordinates in the simplified text form.

Result

{String} Shorted text representation of the EMAPI.LonLat object.  (ia.  “5, 42”).

clone

clone:function()

Creates a copy of the geographical point.

Result

{EMAPI.LonLat} A new EMAPI.LonLat object class with the same coordinate.

add

add:function(lon,
lat)

Creates a copy of the geographical point with coordinates shifted by given values.

Parameters

lon{Float} Shift of the longitude.
lat{Float} Shift of the latitude.

Result

{EMAPI.LonLat} A new shifted EMAPI.LonLat.object.

equals

equals: function (obj)

Compares two geographical points, the current one with the one passed in a parameter.

Parameters

ll{EMAPI.LonLat} A point to compare with the current.

Result

{Boolean} The information if the rectangles are the same.

fromString

fromString: function(str)

An alternative method constructing EMAPI.LonLat class objects basing on coordinates in a text form.

Parameters

str{String} Coordinates separated by comma (i.a.  “5,40”).

Wynik

{EMAPI.LonLat} The new EMAPI.LonLat object based on string that is passed in the parameter.

toString: function ()
Returns the coordinates in a text form.
toShortString:function()
Returns the rectangle coordinates in the simplified text form.
clone:function()
Creates a copy of the geographical point.
add:function(lon,
lat)
Creates a copy of the geographical point with coordinates shifted by given values.
equals: function (obj)
Compares two geographical points, the current one with the one passed in a parameter.
fromString: function(str)
An alternative method constructing EMAPI.LonLat class objects basing on coordinates in a text form.
The constructor of a new instance of geographic point.
Close