Fix: theme compilation

This commit is contained in:
Pieter Vander Vennet 2023-10-11 17:30:06 +02:00
parent dcd02e9ad7
commit 86d0de3806

View file

@ -750,10 +750,12 @@ export class ValidateLayer extends DesugaringStep<LayerConfigJson> {
if (json.minzoom > Constants.minZoomLevelToAddNewPoint) { if (json.minzoom > Constants.minZoomLevelToAddNewPoint) {
const c = context.enter("minzoom") const c = context.enter("minzoom")
const w = json.presets?.length > 0 ? c.err : c.warn const msg = `Minzoom is ${json.minzoom}, this should be at most ${Constants.minZoomLevelToAddNewPoint} as a preset is set. Why? Selecting the pin for a new item will zoom in to level before adding the point. Having a greater minzoom will hide the points, resulting in possible duplicates`
w( if (json.presets?.length > 0) {
`Minzoom is ${json.minzoom}, this should be at most ${Constants.minZoomLevelToAddNewPoint} as a preset is set. Why? Selecting the pin for a new item will zoom in to level before adding the point. Having a greater minzoom will hide the points, resulting in possible duplicates` c.err(msg)
) } else {
c.warn(msg)
}
} }
{ {
// duplicate ids in tagrenderings check // duplicate ids in tagrenderings check