Fix KML ExtendedData reading

This commit is contained in:
Frederic Junod
2017-06-28 09:51:18 +02:00
parent eaaa895b0a
commit 382674975e
2 changed files with 24 additions and 2 deletions

View File

@@ -1092,13 +1092,13 @@ ol.format.KML.setCommonGeometryProperties_ = function(multiGeometry,
ol.format.KML.DataParser_ = function(node, objectStack) {
var name = node.getAttribute('name');
ol.xml.parseNode(ol.format.KML.DATA_PARSERS_, node, objectStack);
var featureObject =
/** @type {Object} */ (objectStack[objectStack.length - 1]);
var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);
if (name !== null) {
featureObject[name] = featureObject.value;
} else if (featureObject.displayName !== null) {
featureObject[featureObject.displayName] = featureObject.value;
}
delete featureObject['value'];
};