Add warning for big minzoom

This commit is contained in:
pietervdvn 2022-08-24 01:29:11 +02:00
parent d4a2b5899b
commit aa5fc97269

View file

@ -538,6 +538,10 @@ export class ValidateLayer extends DesugaringStep<LayerConfigJson> {
}
}
if(json.minzoom > Constants.userJourney.minZoomLevelToAddNewPoints ){
(json.presets?.length > 0 ? errors : warnings).push(`At ${context}: minzoom is ${json.minzoom}, this should be at most ${Constants.userJourney.minZoomLevelToAddNewPoints} 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`)
}
{
// duplicate ids in tagrenderings check
const duplicates = Utils.Dedup(Utils.Dupiclates(Utils.NoNull((json.tagRenderings ?? []).map(tr => tr["id"]))))