forked from MapComplete/MapComplete
Add more checks in the import helper after user testing
This commit is contained in:
parent
2dac893bb3
commit
9617dbc34d
15 changed files with 344 additions and 94 deletions
|
@ -42,9 +42,9 @@ class PreviewPanel extends ScrollableFullScreen {
|
|||
/**
|
||||
* Shows the data to import on a map, asks for the correct layer to be selected
|
||||
*/
|
||||
export class MapPreview extends Combine implements FlowStep<{ bbox: BBox, layer: LayerConfig, geojson: any }> {
|
||||
export class MapPreview extends Combine implements FlowStep<{ bbox: BBox, layer: LayerConfig, features: any[] }> {
|
||||
public readonly IsValid: UIEventSource<boolean>;
|
||||
public readonly Value: UIEventSource<{ bbox: BBox, layer: LayerConfig, geojson: any }>
|
||||
public readonly Value: UIEventSource<{ bbox: BBox, layer: LayerConfig, features: any[] }>
|
||||
|
||||
constructor(
|
||||
state: UserRelatedState,
|
||||
|
@ -153,7 +153,7 @@ export class MapPreview extends Combine implements FlowStep<{ bbox: BBox, layer:
|
|||
this.Value = bbox.map(bbox =>
|
||||
({
|
||||
bbox,
|
||||
geojson,
|
||||
features: geojson.features,
|
||||
layer: layerPicker.GetValue().data
|
||||
}), [layerPicker.GetValue()])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue