Do not warn for features that have been added

This commit is contained in:
pietervdvn 2022-04-28 11:47:54 +02:00
parent 3951b8d5c8
commit ef60cfad26

View file

@ -41,17 +41,21 @@ export default class PerLayerFeatureSourceSplitter {
} }
for (const f of features) { for (const f of features) {
let foundALayer = false;
for (const layer of layers.data) { for (const layer of layers.data) {
if (layer.layerDef.source.osmTags.matchesProperties(f.feature.properties)) { if (layer.layerDef.source.osmTags.matchesProperties(f.feature.properties)) {
// We have found our matching layer! // We have found our matching layer!
featuresPerLayer.get(layer.layerDef.id).push(f) featuresPerLayer.get(layer.layerDef.id).push(f)
foundALayer = true;
if (!layer.layerDef.passAllFeatures) { if (!layer.layerDef.passAllFeatures) {
// If not 'passAllFeatures', we are done for this feature // If not 'passAllFeatures', we are done for this feature
break; break
} }
} }
} }
noLayerFound.push(f) if(!foundALayer){
noLayerFound.push(f)
}
} }
// At this point, we have our features per layer as a list // At this point, we have our features per layer as a list