Rename _ol_proj_Units_ to Units
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import {inherits} from '../index.js';
|
||||
import {cosh} from '../math.js';
|
||||
import _ol_proj_Projection_ from '../proj/Projection.js';
|
||||
import _ol_proj_Units_ from '../proj/Units.js';
|
||||
import Units from '../proj/Units.js';
|
||||
var _ol_proj_EPSG3857_ = {};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ var _ol_proj_EPSG3857_ = {};
|
||||
_ol_proj_EPSG3857_.Projection_ = function(code) {
|
||||
_ol_proj_Projection_.call(this, {
|
||||
code: code,
|
||||
units: _ol_proj_Units_.METERS,
|
||||
units: Units.METERS,
|
||||
extent: _ol_proj_EPSG3857_.EXTENT,
|
||||
global: true,
|
||||
worldExtent: _ol_proj_EPSG3857_.WORLD_EXTENT,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_proj_Projection_ from '../proj/Projection.js';
|
||||
import _ol_proj_Units_ from '../proj/Units.js';
|
||||
import Units from '../proj/Units.js';
|
||||
var _ol_proj_EPSG4326_ = {};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ var _ol_proj_EPSG4326_ = {};
|
||||
_ol_proj_EPSG4326_.Projection_ = function(code, opt_axisOrientation) {
|
||||
_ol_proj_Projection_.call(this, {
|
||||
code: code,
|
||||
units: _ol_proj_Units_.DEGREES,
|
||||
units: Units.DEGREES,
|
||||
extent: _ol_proj_EPSG4326_.EXTENT,
|
||||
axisOrientation: opt_axisOrientation,
|
||||
global: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/proj/Projection
|
||||
*/
|
||||
import _ol_proj_Units_ from '../proj/Units.js';
|
||||
import Units from '../proj/Units.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -153,7 +153,7 @@ _ol_proj_Projection_.prototype.getUnits = function() {
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Projection_.prototype.getMetersPerUnit = function() {
|
||||
return this.metersPerUnit_ || _ol_proj_Units_.METERS_PER_UNIT[this.units_];
|
||||
return this.metersPerUnit_ || Units.METERS_PER_UNIT[this.units_];
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* `'us-ft'`.
|
||||
* @enum {string}
|
||||
*/
|
||||
var _ol_proj_Units_ = {
|
||||
var Units = {
|
||||
DEGREES: 'degrees',
|
||||
FEET: 'ft',
|
||||
METERS: 'm',
|
||||
@@ -22,11 +22,11 @@ var _ol_proj_Units_ = {
|
||||
* @type {Object.<ol.proj.Units, number>}
|
||||
* @api
|
||||
*/
|
||||
_ol_proj_Units_.METERS_PER_UNIT = {};
|
||||
Units.METERS_PER_UNIT = {};
|
||||
// use the radius of the Normal sphere
|
||||
_ol_proj_Units_.METERS_PER_UNIT[_ol_proj_Units_.DEGREES] =
|
||||
Units.METERS_PER_UNIT[Units.DEGREES] =
|
||||
2 * Math.PI * 6370997 / 360;
|
||||
_ol_proj_Units_.METERS_PER_UNIT[_ol_proj_Units_.FEET] = 0.3048;
|
||||
_ol_proj_Units_.METERS_PER_UNIT[_ol_proj_Units_.METERS] = 1;
|
||||
_ol_proj_Units_.METERS_PER_UNIT[_ol_proj_Units_.USFEET] = 1200 / 3937;
|
||||
export default _ol_proj_Units_;
|
||||
Units.METERS_PER_UNIT[Units.FEET] = 0.3048;
|
||||
Units.METERS_PER_UNIT[Units.METERS] = 1;
|
||||
Units.METERS_PER_UNIT[Units.USFEET] = 1200 / 3937;
|
||||
export default Units;
|
||||
|
||||
Reference in New Issue
Block a user