Add more consistency checks, slight refactoring of theme conversions

This commit is contained in:
Pieter Vander Vennet 2022-02-04 00:44:09 +01:00
parent 5d884a97f9
commit 7001216ab7
8 changed files with 457 additions and 276 deletions

View file

@ -45,6 +45,9 @@ export default class CreateNoteImportLayer extends Conversion<LayerConfigJson, L
const pointRenderings = (layerJson.mapRendering ?? []).filter(r => r !== null && r["location"] !== undefined);
const firstRender = <PointRenderingConfigJson>(pointRenderings [0])
if(firstRender === undefined){
throw `Layer ${layerJson.id} does not have a pointRendering: `+context
}
const icon = firstRender.icon
const iconBadges = []
const title = layer.presets[0].title