diff --git a/src/ol/proj/epsg3857.js b/src/ol/proj/epsg3857.js index 0235f69223..9cd1c1684a 100644 --- a/src/ol/proj/epsg3857.js +++ b/src/ol/proj/epsg3857.js @@ -1,7 +1,6 @@ /** * @module ol/proj/epsg3857 */ -import {inherits} from '../util.js'; import {cosh} from '../math.js'; import Projection from '../proj/Projection.js'; import Units from '../proj/Units.js'; @@ -43,16 +42,14 @@ export const WORLD_EXTENT = [-180, -85, 180, 85]; /** * @classdesc * Projection object for web/spherical Mercator (EPSG:3857). - * - * @extends {module:ol/proj/Projection} */ -class EPSG3857Projection { +class EPSG3857Projection extends Projection { /** * @param {string} code Code. */ constructor(code) { - Projection.call(this, { + super({ code: code, units: Units.METERS, extent: EXTENT, @@ -67,8 +64,6 @@ class EPSG3857Projection { } -inherits(EPSG3857Projection, Projection); - /** * Projections equal to EPSG:3857. diff --git a/src/ol/proj/epsg4326.js b/src/ol/proj/epsg4326.js index d626467d91..7001b8eab5 100644 --- a/src/ol/proj/epsg4326.js +++ b/src/ol/proj/epsg4326.js @@ -1,7 +1,6 @@ /** * @module ol/proj/epsg4326 */ -import {inherits} from '../util.js'; import Projection from '../proj/Projection.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. * 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. - * - * @constructor - * @extends {module:ol/proj/Projection} */ -class EPSG4326Projection { +class EPSG4326Projection extends Projection { /** * @param {string} code Code. * @param {string=} opt_axisOrientation Axis orientation. */ constructor(code, opt_axisOrientation) { - Projection.call(this, { + super({ code: code, units: Units.DEGREES, extent: EXTENT, @@ -63,8 +59,6 @@ class EPSG4326Projection { } -inherits(EPSG4326Projection, Projection); - /** * Projections equal to EPSG:4326.