Make 'allowMove' obligatory

This commit is contained in:
Pieter Vander Vennet 2024-09-02 10:29:01 +02:00
parent 48a87aa52f
commit f304a02c46
5 changed files with 33 additions and 11 deletions

View file

@ -149,7 +149,8 @@
] ]
} }
} }
] ],
"allowMove": false
}, },
{ {
"id": "osm_adresses", "id": "osm_adresses",
@ -187,7 +188,8 @@
"render": 1 "render": 1
} }
} }
] ],
"allowMove": false
}, },
{ {
"id": "bag_pand", "id": "bag_pand",
@ -394,7 +396,8 @@
"render": 1 "render": 1
} }
} }
] ],
"allowMove": false
}, },
{ {
"id": "bag_verblijfsobject", "id": "bag_verblijfsobject",
@ -452,7 +455,8 @@
"render": 1 "render": 1
} }
} }
] ],
"allowMove": false
} }
] ]
} }

View file

@ -137,7 +137,8 @@
}, },
"width": "5" "width": "5"
} }
] ],
"allowMove": false
}, },
{ {
"id": "parks", "id": "parks",
@ -241,7 +242,8 @@
}, },
"width": "5" "width": "5"
} }
] ],
"allowMove": false
}, },
{ {
"id": "forest", "id": "forest",
@ -364,7 +366,8 @@
}, },
"width": "5" "width": "5"
} }
] ],
"allowMove": false
}, },
"viewpoint" "viewpoint"
], ],

View file

@ -274,7 +274,8 @@
] ]
} }
} }
] ],
"allowMove": false
}, },
{ {
"id": "grb", "id": "grb",
@ -539,7 +540,8 @@
] ]
} }
} }
] ],
"allowMove": false
}, },
{ {
"id": "service_ways", "id": "service_ways",
@ -556,7 +558,8 @@
"width": 4, "width": 4,
"color": "#888888" "color": "#888888"
} }
] ],
"allowMove": false
}, },
{ {
"id": "generic_osm_object", "id": "generic_osm_object",
@ -602,7 +605,8 @@
"width": "1", "width": "1",
"fill": "no" "fill": "no"
} }
] ],
"allowMove": false
}, },
"address", "address",
{ {

View file

@ -203,6 +203,7 @@ export default class CreateNoteImportLayer extends Conversion<LayerConfigJson, L
anchor: "center", anchor: "center",
}, },
], ],
allowMove: false
} }
} }
} }

View file

@ -141,6 +141,16 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
} }
} }
if(json.allowMove === undefined){
if (!Constants.priviliged_layers.find((x) => x == json.id)) {
context.err(
"Layer " +
json.id +
" does not have an explicit 'allowMove'"
)
}
}
if (context.hasErrors()) { if (context.hasErrors()) {
return undefined return undefined
} }