Implement read/write transforms for ol.format.GPX

This commit is contained in:
tsauerwein
2014-08-08 15:05:35 +02:00
parent e446738491
commit 31dbbc6a8c
7 changed files with 154 additions and 11 deletions

View File

@@ -162,7 +162,8 @@ ol.format.GML.readGeometry = function(node, objectStack) {
var geometry = ol.xml.pushParseAndPop(/** @type {ol.geom.Geometry} */(null),
ol.format.GML.GEOMETRY_PARSERS_, node, objectStack);
if (goog.isDefAndNotNull(geometry)) {
return ol.format.Feature.transformWithOptions(geometry, false, context);
return ol.format.Feature.transformWithOptions(
geometry, false, false, context);
} else {
return undefined;
}
@@ -1467,7 +1468,8 @@ ol.format.GML.writeGeometry = function(node, geometry, objectStack) {
}
} else {
goog.asserts.assertInstanceof(geometry, ol.geom.Geometry);
value = ol.format.Feature.transformWithOptions(geometry, true, context);
value =
ol.format.Feature.transformWithOptions(geometry, true, true, context);
}
ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */
(item), ol.format.GML.GEOMETRY_SERIALIZERS_,