Don't dispatch change events when reading features

Based on initial work by https://github.com/Jinkwon
This commit is contained in:
Frederic Junod
2019-01-15 09:00:46 +01:00
parent aa0bc8175b
commit 787fd4aa44
8 changed files with 15 additions and 15 deletions

View File

@@ -517,7 +517,7 @@ class KML extends XMLFeature {
// we do not remove the styleUrl property from the object, so it
// gets stored on feature when setProperties is called
feature.setProperties(object);
feature.setProperties(object, true);
return feature;
}
@@ -1524,7 +1524,7 @@ function readLineString(node, objectStack) {
readFlatCoordinatesFromNode(node, objectStack);
if (flatCoordinates) {
const lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);
lineString.setProperties(properties);
lineString.setProperties(properties, true);
return lineString;
} else {
return undefined;
@@ -1545,7 +1545,7 @@ function readLinearRing(node, objectStack) {
readFlatCoordinatesFromNode(node, objectStack);
if (flatCoordinates) {
const polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, [flatCoordinates.length]);
polygon.setProperties(properties);
polygon.setProperties(properties, true);
return polygon;
} else {
return undefined;
@@ -1638,7 +1638,7 @@ function readPoint(node, objectStack) {
readFlatCoordinatesFromNode(node, objectStack);
if (flatCoordinates) {
const point = new Point(flatCoordinates, GeometryLayout.XYZ);
point.setProperties(properties);
point.setProperties(properties, true);
return point;
} else {
return undefined;
@@ -1676,7 +1676,7 @@ function readPolygon(node, objectStack) {
ends.push(flatCoordinates.length);
}
const polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);
polygon.setProperties(properties);
polygon.setProperties(properties, true);
return polygon;
} else {
return undefined;