forked from MapComplete/MapComplete
Refactoring: remove old and obsolete data fields in themes and layers
This commit is contained in:
parent
130ae82e90
commit
922cebf9d1
49 changed files with 574 additions and 664 deletions
|
|
@ -92,7 +92,6 @@ export default class CreateNoteImportLayer extends Conversion<LayerConfigJson, L
|
|||
this._includeClosedNotesDays +
|
||||
"&bbox={x_min},{y_min},{x_max},{y_max}",
|
||||
geoJsonZoomLevel: 10,
|
||||
maxCacheAge: 0,
|
||||
},
|
||||
/* We need to set 'pass_all_features'
|
||||
There are probably many note_import-layers, and we don't want the first one to gobble up all notes and then discard them...
|
||||
|
|
|
|||
|
|
@ -135,6 +135,10 @@ export class UpdateLegacyLayer extends DesugaringStep<
|
|||
delete config["rotation"]
|
||||
delete config["wayHandling"]
|
||||
delete config["hideUnderlayingFeaturesMinPercentage"]
|
||||
const src = config.source
|
||||
delete src["isOsmCache"]
|
||||
delete src["maxCacheAge"]
|
||||
delete src["widenFactor"]
|
||||
|
||||
for (const mapRenderingElement of config["mapRendering"] ?? []) {
|
||||
if (mapRenderingElement["iconOverlays"] !== undefined) {
|
||||
|
|
|
|||
|
|
@ -1615,6 +1615,18 @@ export class ValidateLayer extends Conversion<
|
|||
context.enters("doCount").err("Use `isCounted` instead of `doCount`")
|
||||
}
|
||||
|
||||
if (json.source) {
|
||||
const src = json.source
|
||||
if (src["isOsmCache"] !== undefined) {
|
||||
context.enters("source").err("isOsmCache is deprecated")
|
||||
}
|
||||
if (src["maxCacheAge"] !== undefined) {
|
||||
context
|
||||
.enters("source")
|
||||
.err("maxCacheAge is deprecated; it is " + src["maxCacheAge"])
|
||||
}
|
||||
}
|
||||
|
||||
return { raw: json, parsed: layerConfig }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue