Projection definition class. One of these is created for each projection
supported in the application and stored in the module:ol/proj namespace.
You can use these in applications, but this is not required, as API params
and options use module:ol/proj~ProjectionLike which means the simple string
code will suffice.
You can use module:ol/proj~get to retrieve the object for a particular
projection.
The library includes definitions for EPSG:4326 and EPSG:3857, together
with the following aliases:
If you use proj4js, aliases can
be added using proj4.defs(). After all required projection definitions are
added, call the module:ol/proj/proj4~register function.
Whether the projection is valid for the whole globe.
metersPerUnit
number
The meters per unit for the SRS.
If not provided, the units are used to get the meters per unit from the module:ol/proj/Units~METERS_PER_UNIT
lookup table.
Function to determine resolution at a point. The function is called with a
{number} view resolution and an {module:ol/coordinate~Coordinate} as arguments, and returns
the {number} resolution at the passed coordinate. If this is undefined,
the default module:ol/proj#getPointResolution function will be used.
Methods
getAxisOrientation(){string}
proj/Projection.js, line 197
Get the axis orientation of this projection.
Example values are:
enu - the default easting, northing, elevation.
neu - northing, easting, up - useful for "lat/long" geographic coordinates,
or south orientated transverse mercator.
wnu - westing, northing, up - some planetary coordinate systems have
"west positive" coordinate systems
Returns:
Axis orientation.
getCode(){string}
proj/Projection.js, line 144
Get the code for this projection, e.g. 'EPSG:4326'.
Get the amount of meters per unit of this projection. If the projection is
not configured with metersPerUnit or a units identifier, the return is
undefined.