Merge pull request #7133 from Sol1du2/issue/6991/WFSWriteDimension

Issue/6991/WFS Write Dimension
This commit is contained in:
Bart van den Eijnden
2017-08-29 09:57:44 +02:00
committed by GitHub
9 changed files with 97 additions and 62 deletions

View File

@@ -576,6 +576,8 @@ ol.format.GML3.prototype.SEGMENTS_PARSERS_ = {
ol.format.GML3.prototype.writePos_ = function(node, value, objectStack) {
var context = objectStack[objectStack.length - 1];
var hasZ = context['hasZ'];
var srsDimension = hasZ ? 3 : 2;
node.setAttribute('srsDimension', srsDimension);
var srsName = context['srsName'];
var axisOrientation = 'enu';
if (srsName) {
@@ -632,6 +634,8 @@ ol.format.GML3.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
ol.format.GML3.prototype.writePosList_ = function(node, value, objectStack) {
var context = objectStack[objectStack.length - 1];
var hasZ = context['hasZ'];
var srsDimension = hasZ ? 3 : 2;
node.setAttribute('srsDimension', srsDimension);
var srsName = context['srsName'];
// only 2d for simple features profile
var points = value.getCoordinates();