forked from MapComplete/MapComplete
Auto-formatting
This commit is contained in:
parent
9e000d521f
commit
fed4cff878
26 changed files with 360 additions and 304 deletions
|
@ -1,29 +1,29 @@
|
|||
import UserRelatedState from "./UserRelatedState"
|
||||
import {Store, Stores, UIEventSource} from "../UIEventSource"
|
||||
import { Store, Stores, UIEventSource } from "../UIEventSource"
|
||||
import BaseLayer from "../../Models/BaseLayer"
|
||||
import LayoutConfig from "../../Models/ThemeConfig/LayoutConfig"
|
||||
import AvailableBaseLayers from "../Actors/AvailableBaseLayers"
|
||||
import Attribution from "../../UI/BigComponents/Attribution"
|
||||
import Minimap, {MinimapObj} from "../../UI/Base/Minimap"
|
||||
import {Tiles} from "../../Models/TileRange"
|
||||
import Minimap, { MinimapObj } from "../../UI/Base/Minimap"
|
||||
import { Tiles } from "../../Models/TileRange"
|
||||
import BaseUIElement from "../../UI/BaseUIElement"
|
||||
import FilteredLayer, {FilterState} from "../../Models/FilteredLayer"
|
||||
import FilteredLayer, { FilterState } from "../../Models/FilteredLayer"
|
||||
import TilesourceConfig from "../../Models/ThemeConfig/TilesourceConfig"
|
||||
import {QueryParameters} from "../Web/QueryParameters"
|
||||
import { QueryParameters } from "../Web/QueryParameters"
|
||||
import ShowOverlayLayer from "../../UI/ShowDataLayer/ShowOverlayLayer"
|
||||
import {FeatureSourceForLayer, Tiled} from "../FeatureSource/FeatureSource"
|
||||
import { FeatureSourceForLayer, Tiled } from "../FeatureSource/FeatureSource"
|
||||
import SimpleFeatureSource from "../FeatureSource/Sources/SimpleFeatureSource"
|
||||
import {LocalStorageSource} from "../Web/LocalStorageSource"
|
||||
import {GeoOperations} from "../GeoOperations"
|
||||
import { LocalStorageSource } from "../Web/LocalStorageSource"
|
||||
import { GeoOperations } from "../GeoOperations"
|
||||
import TitleHandler from "../Actors/TitleHandler"
|
||||
import {BBox} from "../BBox"
|
||||
import { BBox } from "../BBox"
|
||||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
||||
import {TiledStaticFeatureSource} from "../FeatureSource/Sources/StaticFeatureSource"
|
||||
import {Translation, TypedTranslation} from "../../UI/i18n/Translation"
|
||||
import {Tag} from "../Tags/Tag"
|
||||
import {OsmConnection} from "../Osm/OsmConnection"
|
||||
import {Feature, LineString} from "geojson"
|
||||
import {OsmTags} from "../../Models/OsmFeature"
|
||||
import { TiledStaticFeatureSource } from "../FeatureSource/Sources/StaticFeatureSource"
|
||||
import { Translation, TypedTranslation } from "../../UI/i18n/Translation"
|
||||
import { Tag } from "../Tags/Tag"
|
||||
import { OsmConnection } from "../Osm/OsmConnection"
|
||||
import { Feature, LineString } from "geojson"
|
||||
import { OsmTags } from "../../Models/OsmFeature"
|
||||
|
||||
export interface GlobalFilter {
|
||||
filter: FilterState
|
||||
|
@ -266,27 +266,30 @@ export default class MapState extends UserRelatedState {
|
|||
this.currentUserLocation = new SimpleFeatureSource(gpsLayerDef, Tiles.tile_index(0, 0, 0))
|
||||
}
|
||||
|
||||
private initSelectedElement(){
|
||||
private initSelectedElement() {
|
||||
const layerDef: FilteredLayer = this.filteredLayers.data.filter(
|
||||
(l) => l.layerDef.id === "selected_element"
|
||||
)[0]
|
||||
const empty = []
|
||||
const store = this.selectedElement.map(feature => {
|
||||
if(feature === undefined || feature === null){
|
||||
const store = this.selectedElement.map((feature) => {
|
||||
if (feature === undefined || feature === null) {
|
||||
return empty
|
||||
}
|
||||
return [{
|
||||
feature: {
|
||||
type:"Feature",
|
||||
properties: {
|
||||
selected: "yes",
|
||||
id: "selected" + feature.properties.id
|
||||
return [
|
||||
{
|
||||
feature: {
|
||||
type: "Feature",
|
||||
properties: {
|
||||
selected: "yes",
|
||||
id: "selected" + feature.properties.id,
|
||||
},
|
||||
geometry: feature.geometry,
|
||||
},
|
||||
geometry:feature.geometry
|
||||
}
|
||||
, freshness: new Date()}];
|
||||
});
|
||||
this.selectedElementsLayer = new TiledStaticFeatureSource(store,layerDef);
|
||||
freshness: new Date(),
|
||||
},
|
||||
]
|
||||
})
|
||||
this.selectedElementsLayer = new TiledStaticFeatureSource(store, layerDef)
|
||||
}
|
||||
|
||||
private initUserLocationTrail() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue