Class: LonLat

cercalia.LonLat

Coordinates. Let you specify the coordinates in the desired projection.
Default value: EPSG:4326.

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

Returns:
Class name
Returns:
Latitud
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.
Name Type Description
lat number

Coordinate Latitude

Name Type Description
lon number

Longitude

Returns:
To string longitude,latitude. For example: `"1.41651,41.541451"

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.