forked from MapComplete/MapComplete
Add Wikipedia page box
This commit is contained in:
parent
df34239256
commit
9df263c362
12 changed files with 3605 additions and 3457 deletions
33
test.ts
33
test.ts
|
@ -1,31 +1,14 @@
|
|||
import {AllKnownLayouts} from "./Customizations/AllKnownLayouts";
|
||||
import TagRenderingQuestion from "./UI/Popup/TagRenderingQuestion";
|
||||
import {UIEventSource} from "./Logic/UIEventSource";
|
||||
import {VariableUiElement} from "./UI/Base/VariableUIElement";
|
||||
import Wikipedia from "./Logic/Web/Wikipedia";
|
||||
import {FixedUiElement} from "./UI/Base/FixedUiElement";
|
||||
import WikipediaBox from "./UI/WikipediaBox";
|
||||
import Loading from "./UI/Base/Loading";
|
||||
|
||||
const theme = AllKnownLayouts.allKnownLayouts.get("charging_stations")
|
||||
|
||||
const tagRendering = theme.layers[0].tagRenderings.filter(tr => tr.id === "Available_charging_stations (generated)")[0]
|
||||
const tag = new UIEventSource({
|
||||
id: "node/42",
|
||||
amenity:"charging_station",
|
||||
bicycle:"yes",
|
||||
car:"no",
|
||||
"motorcar":"no",
|
||||
"hgv":"no",
|
||||
bus:"no"
|
||||
new WikipediaBox({
|
||||
pagename: "Poertoren",
|
||||
language: "nl"
|
||||
})
|
||||
window.tags = tag
|
||||
|
||||
//const q =
|
||||
new VariableUiElement(tag.map(_ => new TagRenderingQuestion(tag, tagRendering) ))
|
||||
.SetStyle("width: 100px")
|
||||
.SetStyle("max-height: 20rem;")
|
||||
.AttachTo("maindiv")
|
||||
|
||||
|
||||
window.setTimeout(_ => {
|
||||
tag.data.bicycle="no"
|
||||
tag.data.car = "yes"
|
||||
tag.ping()
|
||||
console.log("Pinged")
|
||||
}, 2500)
|
Loading…
Add table
Add a link
Reference in a new issue