new ol.proj.Projection(options)
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Projection options.
|
Methods
-
getCode(){string}
src/ol/proj/proj.js, line 203 -
Get the code for this projection, e.g. 'EPSG:4326'.
Returns:
Code.
-
getExtent(){ol.Extent}
src/ol/proj/proj.js, line 213 -
Get the validity extent for this projection.
Returns:
Extent.
-
getMetersPerUnit(){number|undefined}
src/ol/proj/proj.js, line 235 -
Get the amount of meters per unit of this projection. If the projection is not configured with
metersPerUnit
or a units identifier, the return isundefined
.Returns:
Meters.
-
getPointResolution(resolution, point){number} experimental
src/ol/proj/proj.js, line 393 -
Get the resolution of the point in degrees or distance units. For projections with degrees as the unit this will simply return the provided resolution. The default for other projections is to estimate the point resolution by transforming the 'point' pixel to EPSG:4326, measuring its width and height on the normal sphere, and taking the average of the width and height. An alternative implementation may be given when constructing a projection. For many local projections, such a custom function will return the resolution unchanged.
Name Type Description resolution
number Resolution in projection units.
point
ol.Coordinate Point.
Returns:
Point resolution in projection units.
-
getUnits(){ol.proj.Units}
src/ol/proj/proj.js, line 223 -
Get the units of this projection.
Returns:
Units.
-
getWorldExtent(){ol.Extent} experimental
src/ol/proj/proj.js, line 245 -
Get the world extent for this projection.
Returns:
Extent.
-
isGlobal(){boolean}
src/ol/proj/proj.js, line 270 -
Is this projection a global projection which spans the whole world?
Returns:
Whether the projection is global.
-
setExtent(extent)
src/ol/proj/proj.js, line 307 -
Set the validity extent for this projection.
Name Type Description extent
ol.Extent Extent.
-
setGetPointResolution(func) experimental
src/ol/proj/proj.js, line 329 -
Set the getPointResolution function for this projection.
Name Type Description func
function Function
-
setGlobal(global)
src/ol/proj/proj.js, line 280 -
Set if the projection is a global projection which spans the whole world
Name Type Description global
boolean Whether the projection is global.
-
setWorldExtent(worldExtent) experimental
src/ol/proj/proj.js, line 319 -
Set the world extent for this projection.
Name Type Description worldExtent
ol.Extent World extent [minlon, minlat, maxlon, maxlat].