Merge pull request #9500 from edellucien/kml_extended_data
KML string validation with extendedData
This commit is contained in:
@@ -2684,13 +2684,6 @@ function writePlacemark(node, feature, objectStack) {
|
||||
return !filter[v];
|
||||
});
|
||||
|
||||
if (keys.length > 0) {
|
||||
const sequence = makeSequence(properties, keys);
|
||||
const namesAndValues = {names: keys, values: sequence};
|
||||
pushSerializeAndPop(context, PLACEMARK_SERIALIZERS,
|
||||
EXTENDEDDATA_NODE_FACTORY, [namesAndValues], objectStack);
|
||||
}
|
||||
|
||||
const styleFunction = feature.getStyleFunction();
|
||||
if (styleFunction) {
|
||||
// FIXME the styles returned by the style function are supposed to be
|
||||
@@ -2713,6 +2706,13 @@ function writePlacemark(node, feature, objectStack) {
|
||||
pushSerializeAndPop(context, PLACEMARK_SERIALIZERS,
|
||||
OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
|
||||
|
||||
if (keys.length > 0) {
|
||||
const sequence = makeSequence(properties, keys);
|
||||
const namesAndValues = {names: keys, values: sequence};
|
||||
pushSerializeAndPop(context, PLACEMARK_SERIALIZERS,
|
||||
EXTENDEDDATA_NODE_FACTORY, [namesAndValues], objectStack);
|
||||
}
|
||||
|
||||
// serialize geometry
|
||||
const options = /** @type {import("./Feature.js").WriteOptions} */ (objectStack[0]);
|
||||
let geometry = feature.getGeometry();
|
||||
|
||||
Reference in New Issue
Block a user