Replace proj/Units enum with typedef

This commit is contained in:
Maximilian Krög
2022-07-17 00:36:18 +02:00
parent 361f1ab837
commit 7ac61fdc70
14 changed files with 52 additions and 93 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
/**
* @module ol/format/Feature
*/
import Units from '../proj/Units.js';
import {abstract} from '../util.js';
import {
equivalent as equivalentProjection,
@@ -103,7 +102,7 @@ class FeatureFormat {
if (
opt_options.extent &&
dataProjection &&
dataProjection.getUnits() === Units.TILE_PIXELS
dataProjection.getUnits() === 'tile-pixels'
) {
dataProjection = getProjection(dataProjection);
dataProjection.setWorldExtent(opt_options.extent);
+1 -2
View File
@@ -13,7 +13,6 @@ import Point from '../geom/Point.js';
import Polygon from '../geom/Polygon.js';
import Projection from '../proj/Projection.js';
import RenderFeature from '../render/Feature.js';
import Units from '../proj/Units.js';
import {assert} from '../asserts.js';
import {get} from '../proj.js';
import {inflateEnds} from '../geom/flat/orient.js';
@@ -52,7 +51,7 @@ class MVT extends FeatureFormat {
*/
this.dataProjection = new Projection({
code: '',
units: Units.TILE_PIXELS,
units: 'tile-pixels',
});
/**