forked from MapComplete/MapComplete
Fix caching script
This commit is contained in:
parent
97c88af619
commit
b67e108056
1 changed files with 8 additions and 2 deletions
|
@ -274,9 +274,15 @@ function sliceToTiles(allFeatures: FeatureSource, theme: LayoutConfig, relations
|
||||||
// Evaluate all the calculated tags strictly
|
// Evaluate all the calculated tags strictly
|
||||||
const calculatedTagKeys = tile.layer.layerDef.calculatedTags.map(ct => ct[0])
|
const calculatedTagKeys = tile.layer.layerDef.calculatedTags.map(ct => ct[0])
|
||||||
featureCount++
|
featureCount++
|
||||||
|
const props = feature.feature.properties
|
||||||
for (const calculatedTagKey of calculatedTagKeys) {
|
for (const calculatedTagKey of calculatedTagKeys) {
|
||||||
const strict = feature.feature.properties[calculatedTagKey]
|
const strict = props[calculatedTagKey]
|
||||||
feature.feature.properties[calculatedTagKey] = strict
|
|
||||||
|
if(props.hasOwnProperty(calculatedTagKey)){
|
||||||
|
delete props[calculatedTagKey]
|
||||||
|
}
|
||||||
|
|
||||||
|
props[calculatedTagKey] = strict
|
||||||
strictlyCalculated++;
|
strictlyCalculated++;
|
||||||
if (strictlyCalculated % 100 === 0) {
|
if (strictlyCalculated % 100 === 0) {
|
||||||
console.log("Strictly calculated ", strictlyCalculated, "values for tile", tileIndex, ": now at ", featureCount, "/", filteredTile.features.data.length, "examle value: ", strict)
|
console.log("Strictly calculated ", strictlyCalculated, "values for tile", tileIndex, ": now at ", featureCount, "/", filteredTile.features.data.length, "examle value: ", strict)
|
||||||
|
|
Loading…
Reference in a new issue