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
+6 -6
View File
@@ -14,7 +14,7 @@ import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js';
import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js';
import _ol_geom_Polygon_ from '../geom/Polygon.js';
import _ol_obj_ from '../obj.js';
import _ol_proj_ from '../proj.js';
import {get as getProjection, transformExtent} from '../proj.js';
import _ol_xml_ from '../xml.js';
/**
@@ -320,7 +320,7 @@ _ol_format_GML3_.prototype.readFlatPos_ = function(node, objectStack) {
var containerSrs = context['srsName'];
var axisOrientation = 'enu';
if (containerSrs) {
var proj = _ol_proj_.get(containerSrs);
var proj = getProjection(containerSrs);
axisOrientation = proj.getAxisOrientation();
}
if (axisOrientation === 'neu') {
@@ -356,7 +356,7 @@ _ol_format_GML3_.prototype.readFlatPosList_ = function(node, objectStack) {
var contextDimension = context['srsDimension'];
var axisOrientation = 'enu';
if (containerSrs) {
var proj = _ol_proj_.get(containerSrs);
var proj = getProjection(containerSrs);
axisOrientation = proj.getAxisOrientation();
}
var coords = s.split(/\s+/);
@@ -582,7 +582,7 @@ _ol_format_GML3_.prototype.writePos_ = function(node, value, objectStack) {
var srsName = context['srsName'];
var axisOrientation = 'enu';
if (srsName) {
axisOrientation = _ol_proj_.get(srsName).getAxisOrientation();
axisOrientation = getProjection(srsName).getAxisOrientation();
}
var point = value.getCoordinates();
var coords;
@@ -611,7 +611,7 @@ _ol_format_GML3_.prototype.writePos_ = function(node, value, objectStack) {
_ol_format_GML3_.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
var axisOrientation = 'enu';
if (opt_srsName) {
axisOrientation = _ol_proj_.get(opt_srsName).getAxisOrientation();
axisOrientation = getProjection(opt_srsName).getAxisOrientation();
}
var coords = ((axisOrientation.substr(0, 2) === 'en') ?
point[0] + ' ' + point[1] :
@@ -956,7 +956,7 @@ _ol_format_GML3_.prototype.writeGeometryElement = function(node, geometry, objec
var value;
if (Array.isArray(geometry)) {
if (context.dataProjection) {
value = _ol_proj_.transformExtent(
value = transformExtent(
geometry, context.featureProjection, context.dataProjection);
} else {
value = geometry;