refactoring: fix special renderings (partly), deprecate

This commit is contained in:
Pieter Vander Vennet 2023-03-29 18:54:00 +02:00
parent 9b2f92dedc
commit aaaaf1948d
15 changed files with 160 additions and 95 deletions

View file

@ -620,6 +620,15 @@ class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> {
': detected `special` on the top level. Did you mean `{"render":{ "special": ... }}`'
)
}
if (json.group) {
errors.push(
"At " +
context +
': groups are deprecated, use `"label": ["' +
json.group +
'"]` instead'
)
}
const freeformType = json["freeform"]?.["type"]
if (freeformType) {
if (Validators.AvailableTypes().indexOf(freeformType) < 0) {
@ -688,6 +697,17 @@ export class ValidateLayer extends DesugaringStep<LayerConfigJson> {
}
}
if (json.source === "special") {
if (!Constants.priviliged_layers.find((x) => x == json.id)) {
errors.push(
context +
": layer " +
json.id +
" uses 'special' as source.osmTags. However, this layer is not a priviliged layer"
)
}
}
if (json.tagRenderings !== undefined && json.tagRenderings.length > 0) {
if (json.title === undefined) {
errors.push(