OsmObjects can now be used as featureSource, load selected object immediately, zoom to selected object on open; fix #191

This commit is contained in:
Pieter Vander Vennet 2021-05-06 01:33:09 +02:00
parent 5ce4140510
commit a0c1bc2137
13 changed files with 205 additions and 98 deletions

View file

@ -18,7 +18,7 @@ import LayerConfig from "./Customizations/JSON/LayerConfig";
import TitleHandler from "./Logic/Actors/TitleHandler";
import PendingChangesUploader from "./Logic/Actors/PendingChangesUploader";
import {Relation} from "./Logic/Osm/ExtractRelations";
import UpdateTagsFromOsmAPI from "./Logic/Actors/UpdateTagsFromOsmAPI";
import OsmApiFeatureSource from "./Logic/FeatureSource/OsmApiFeatureSource";
/**
* Contains the global state: a bunch of UI-event sources
@ -58,6 +58,8 @@ export default class State {
public favouriteLayers: UIEventSource<string[]>;
public layerUpdater: UpdateFromOverpass;
public osmApiFeatureSource : OsmApiFeatureSource = new OsmApiFeatureSource();
public filteredLayers: UIEventSource<{
@ -253,8 +255,6 @@ export default class State {
new TitleHandler(this.layoutToUse, this.selectedElement, this.allElements);
new UpdateTagsFromOsmAPI(this.selectedElement.map(el => el?.properties?.id), this.allElements)
}
private static asFloat(source: UIEventSource<string>): UIEventSource<number> {