new cercalia.LonLat(lon, lat, srs)
Name | Type | Description |
---|---|---|
lon |
number |
Longitude, in geographic coordinate system |
lat |
number |
Latitude, in geographic coordinate system |
srs |
srs | undefined |
optional
SRS |
Methods
-
getClass(){string}
-
Returns:
Class name
-
getLat(){number}
-
Returns:
Latitud
-
getLon(){number}
-
Returns:
Coordinate Longitude
-
getProjectionCode(){string}
-
Obtain the coordinates projection code
Returns:
EPSG code. For example:EPSG:3857
.
-
getProjectionCodeOriginal(){string}
-
Obtain the original coordinates projection code
Returns:
EPSG code. For example:EPSG:3857
.
-
setLat(lat)
-
Name Type Description lat
number Coordinate Latitude
-
setLon(lon)
-
Name Type Description lon
number Longitude
-
toString(){string}
-
Returns:
To string longitude,latitude. For example: `"1.41651,41.541451"
-
transform(srs){ol.Coord}
-
Transform the coordinates to a new projection (need SRS projection parameter).
Name Type Description srs
string SRS [EPSG:23030,EPSG:23031,EPSG:23032,EPSG32629,EPSG:32630,EPSG:32631,EPSG:32632,EPSG:54004]
Returns:
Array[x,y]
projected coordinates.