forked from MapComplete/MapComplete
Merge master
This commit is contained in:
commit
89a0be8903
150 changed files with 4201 additions and 9581 deletions
|
@ -1,39 +1,5 @@
|
|||
<script lang="ts">
|
||||
// Testing grounds
|
||||
|
||||
import { Stores } from "../Logic/UIEventSource"
|
||||
import { Utils } from "../Utils"
|
||||
import jsonld from "jsonld"
|
||||
import SelectedElementView from "./BigComponents/SelectedElementView.svelte"
|
||||
import * as shop from "../assets/generated/layers/shops.json"
|
||||
import LayerConfig from "../Models/ThemeConfig/LayerConfig"
|
||||
import type { OpeningHour } from "./OpeningHours/OpeningHours"
|
||||
import { OH } from "./OpeningHours/OpeningHours"
|
||||
import type { Geometry } from "geojson"
|
||||
|
||||
const shopLayer = new LayerConfig(<any>shop, "shops")
|
||||
|
||||
|
||||
const colruytUrl = "https://www.colruyt.be/nl/winkelzoeker/colruyt-gent"
|
||||
const url = "https://stores.delhaize.be/nl/ad-delhaize-dok-noord"
|
||||
let data = Stores.FromPromise(fetchJsonLd(url)).mapD(properties => ({
|
||||
...properties,
|
||||
id: properties["website"],
|
||||
shop: "supermarket",
|
||||
_country: "be",
|
||||
}))
|
||||
|
||||
let feature = data.mapD(properties => {
|
||||
return <any>{
|
||||
type: "Feature",
|
||||
properties,
|
||||
geometry: {
|
||||
type: "Point",
|
||||
coordinates: properties["geo"],
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
{#if $data}
|
||||
<SelectedElementView layer={shopLayer} selectedElement={$feature} state={undefined} tags={data} />
|
||||
{/if}
|
||||
|
||||
No tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue