Skip to main content

Function: projectionFunctions()

projectionFunctions(projection): object

Defined in: projection-functions.ts:13

The functions that project between a CRS and WGS84 or Web Mercator, and the CRS's meters per unit.

Parameters​

projection​

ProjectionDefinition

The CRS, as parseWkt or an EPSG resolver gives it.

Returns​

mpu​

mpu: number

Meters per unit of the CRS.

projectFrom3857​

projectFrom3857: ProjectionFunction

From Web Mercator to the CRS.

projectFrom4326​

projectFrom4326: ProjectionFunction

From WGS84 longitude and latitude to the CRS.

projectTo3857​

projectTo3857: ProjectionFunction

From the CRS to Web Mercator. Where proj4 can't project a point, such as at a pole, its latitude is clamped to Web Mercator's limit first (see makeClampedForwardTo3857).

projectTo4326​

projectTo4326: ProjectionFunction

From the CRS to WGS84 longitude and latitude.