diff --git a/UI/ImportFlow/CompareToAlreadyExistingNotes.ts b/UI/ImportFlow/CompareToAlreadyExistingNotes.ts index f058eae018..6054e34349 100644 --- a/UI/ImportFlow/CompareToAlreadyExistingNotes.ts +++ b/UI/ImportFlow/CompareToAlreadyExistingNotes.ts @@ -35,17 +35,11 @@ export class CompareToAlreadyExistingNotes extends Combine implements FlowStep<{ constructor(state, params: { bbox: BBox, layer: LayerConfig, geojson: { features: any[] } }) { - const convertState: DesugaringContext = { - sharedLayers: new Map(), - tagRenderings: new Map() - } - - const layerConfig = known_layers.layers.filter(l => l.id === params.layer.id)[0] if (layerConfig === undefined) { console.error("WEIRD: layer not found in the builtin layer overview") } - const importLayerJson = new CreateNoteImportLayer(365).convertStrict(convertState, layerConfig, "CompareToAlreadyExistingNotes") + const importLayerJson = new CreateNoteImportLayer(365).convertStrict(layerConfig, "CompareToAlreadyExistingNotes") const importLayer = new LayerConfig(importLayerJson, "import-layer-dynamic") const flayer: FilteredLayer = { appliedFilters: new UIEventSource>(new Map()), diff --git a/UI/ImportFlow/MapPreview.ts b/UI/ImportFlow/MapPreview.ts index 16f531fd99..1929cd09aa 100644 --- a/UI/ImportFlow/MapPreview.ts +++ b/UI/ImportFlow/MapPreview.ts @@ -87,7 +87,7 @@ export class MapPreview extends Combine implements FlowStep<{ bbox: BBox, layer: const matching: UIEventSource<{ properties: any, geometry: { coordinates: [number, number] } }[]> = layerPicker.GetValue().map((layer: LayerConfig) => { if (layer === undefined) { - return undefined; + return []; } const matching: { properties: any, geometry: { coordinates: [number, number] } }[] = [] diff --git a/UI/ImportFlow/PreviewPanel.ts b/UI/ImportFlow/PreviewPanel.ts index 8a917fd18d..fab9440c03 100644 --- a/UI/ImportFlow/PreviewPanel.ts +++ b/UI/ImportFlow/PreviewPanel.ts @@ -22,9 +22,7 @@ export class PreviewPanel extends Combine implements FlowStep<{ features: { prop state: UserRelatedState, geojson: { features: { properties: any, geometry: { coordinates: [number, number] } }[] }) { const t = Translations.t.importHelper; - console.log("Datapanel received", geojson) - - + const propertyKeys = new Set() for (const f of geojson.features) { Object.keys(f.properties).forEach(key => propertyKeys.add(key)) @@ -36,7 +34,6 @@ export class PreviewPanel extends Combine implements FlowStep<{ features: { prop for (const key of Array.from(propertyKeys)) { const values = Utils.NoNull(geojson.features.map(f => f.properties[key])) - console.log("There are ", values.length, "features with attribute", key, "namely", values) const allSame = !values.some(v => v !== values[0]) let countSummary: BaseUIElement if (values.length === n) {