Cleaned up ol/proj
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/proj/epsg3857
|
* @module ol/proj/epsg3857
|
||||||
*/
|
*/
|
||||||
import {inherits} from '../util.js';
|
|
||||||
import {cosh} from '../math.js';
|
import {cosh} from '../math.js';
|
||||||
import Projection from '../proj/Projection.js';
|
import Projection from '../proj/Projection.js';
|
||||||
import Units from '../proj/Units.js';
|
import Units from '../proj/Units.js';
|
||||||
@@ -43,16 +42,14 @@ export const WORLD_EXTENT = [-180, -85, 180, 85];
|
|||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Projection object for web/spherical Mercator (EPSG:3857).
|
* Projection object for web/spherical Mercator (EPSG:3857).
|
||||||
*
|
|
||||||
* @extends {module:ol/proj/Projection}
|
|
||||||
*/
|
*/
|
||||||
class EPSG3857Projection {
|
class EPSG3857Projection extends Projection {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} code Code.
|
* @param {string} code Code.
|
||||||
*/
|
*/
|
||||||
constructor(code) {
|
constructor(code) {
|
||||||
Projection.call(this, {
|
super({
|
||||||
code: code,
|
code: code,
|
||||||
units: Units.METERS,
|
units: Units.METERS,
|
||||||
extent: EXTENT,
|
extent: EXTENT,
|
||||||
@@ -67,8 +64,6 @@ class EPSG3857Projection {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(EPSG3857Projection, Projection);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projections equal to EPSG:3857.
|
* Projections equal to EPSG:3857.
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/proj/epsg4326
|
* @module ol/proj/epsg4326
|
||||||
*/
|
*/
|
||||||
import {inherits} from '../util.js';
|
|
||||||
import Projection from '../proj/Projection.js';
|
import Projection from '../proj/Projection.js';
|
||||||
import Units from '../proj/Units.js';
|
import Units from '../proj/Units.js';
|
||||||
|
|
||||||
@@ -38,18 +37,15 @@ export const METERS_PER_UNIT = Math.PI * RADIUS / 180;
|
|||||||
* Note that OpenLayers does not strictly comply with the EPSG definition.
|
* Note that OpenLayers does not strictly comply with the EPSG definition.
|
||||||
* The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).
|
* The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).
|
||||||
* OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.
|
* OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.
|
||||||
*
|
|
||||||
* @constructor
|
|
||||||
* @extends {module:ol/proj/Projection}
|
|
||||||
*/
|
*/
|
||||||
class EPSG4326Projection {
|
class EPSG4326Projection extends Projection {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} code Code.
|
* @param {string} code Code.
|
||||||
* @param {string=} opt_axisOrientation Axis orientation.
|
* @param {string=} opt_axisOrientation Axis orientation.
|
||||||
*/
|
*/
|
||||||
constructor(code, opt_axisOrientation) {
|
constructor(code, opt_axisOrientation) {
|
||||||
Projection.call(this, {
|
super({
|
||||||
code: code,
|
code: code,
|
||||||
units: Units.DEGREES,
|
units: Units.DEGREES,
|
||||||
extent: EXTENT,
|
extent: EXTENT,
|
||||||
@@ -63,8 +59,6 @@ class EPSG4326Projection {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(EPSG4326Projection, Projection);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projections equal to EPSG:4326.
|
* Projections equal to EPSG:4326.
|
||||||
|
|||||||
Reference in New Issue
Block a user