Named exports from ol/proj

This commit is contained in:
Tim Schaub
2017-12-13 22:14:27 -07:00
committed by Andreas Hocevar
parent fab77e8d37
commit 6f72ffe498
127 changed files with 853 additions and 882 deletions

View File

@@ -7,7 +7,7 @@ import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
import _ol_Object_ from '../Object.js';
import _ol_control_Control_ from '../control/Control.js';
import _ol_proj_ from '../proj.js';
import {getTransformFromProjections, identityTransform, get as getProjection} from '../proj.js';
/**
* @classdesc
@@ -200,7 +200,7 @@ _ol_control_MousePosition_.prototype.setCoordinateFormat = function(format) {
* @api
*/
_ol_control_MousePosition_.prototype.setProjection = function(projection) {
this.set(_ol_control_MousePosition_.Property_.PROJECTION, _ol_proj_.get(projection));
this.set(_ol_control_MousePosition_.Property_.PROJECTION, getProjection(projection));
};
@@ -214,10 +214,10 @@ _ol_control_MousePosition_.prototype.updateHTML_ = function(pixel) {
if (!this.transform_) {
var projection = this.getProjection();
if (projection) {
this.transform_ = _ol_proj_.getTransformFromProjections(
this.transform_ = getTransformFromProjections(
this.mapProjection_, projection);
} else {
this.transform_ = _ol_proj_.identityTransform;
this.transform_ = identityTransform;
}
}
var map = this.getMap();

View File

@@ -8,7 +8,7 @@ import _ol_control_Control_ from '../control/Control.js';
import _ol_control_ScaleLineUnits_ from '../control/ScaleLineUnits.js';
import _ol_css_ from '../css.js';
import _ol_events_ from '../events.js';
import _ol_proj_ from '../proj.js';
import {getPointResolution, METERS_PER_UNIT} from '../proj.js';
import _ol_proj_Units_ from '../proj/Units.js';
/**
@@ -175,7 +175,7 @@ _ol_control_ScaleLine_.prototype.updateElement_ = function() {
_ol_proj_Units_.DEGREES :
_ol_proj_Units_.METERS;
var pointResolution =
_ol_proj_.getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);
getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);
if (units != _ol_control_ScaleLineUnits_.DEGREES) {
pointResolution *= projection.getMetersPerUnit();
}
@@ -183,7 +183,7 @@ _ol_control_ScaleLine_.prototype.updateElement_ = function() {
var nominalCount = this.minWidth_ * pointResolution;
var suffix = '';
if (units == _ol_control_ScaleLineUnits_.DEGREES) {
var metersPerDegree = _ol_proj_.METERS_PER_UNIT[_ol_proj_Units_.DEGREES];
var metersPerDegree = METERS_PER_UNIT[_ol_proj_Units_.DEGREES];
if (projection.getUnits() == _ol_proj_Units_.DEGREES) {
nominalCount *= metersPerDegree;
} else {