Themes: a few improvements to velopark
This commit is contained in:
parent
872e36dffa
commit
e7a57125d7
3 changed files with 29 additions and 16 deletions
|
@ -104,9 +104,14 @@
|
|||
"id": "list_nearby_bike_parkings",
|
||||
"render": {
|
||||
"special": {
|
||||
"prefix": {
|
||||
"en": "Choose below which bicycle parking you want to link. This will <b>not</b> apply the attributes.",
|
||||
"nl": "Kies hieronder welke fietsenstalling je wilt linken. Dit zal de attributen <b>niet</b> kopieren."
|
||||
},
|
||||
"type": "multi",
|
||||
"key": "_nearby_bicycle_parkings:props",
|
||||
"tagrendering": "<span class='p-2 m-1 border-2 border-dashed border-gray'><b><a href='#{id}'>{id}</a></b> ({_distance}m, {_velopark:id}) </span>{minimap(20)} {tag_apply(ref:velopark=$_ref,Link,link,id,_mr_id)}"
|
||||
"classes": "p-2 m-1 my-4 border-2 border-dashed border-black",
|
||||
"tagrendering": "<b><a href='#{id}'>{id}</a></b> ({_distance}m, {_velopark:id}) {minimap(20)} {tag_apply(ref:velopark=$_ref,Link this object.,link,id,_mr_id)}"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -118,8 +123,8 @@
|
|||
"targetLayer": "bike_parking_with_velopark_ref bike_parking",
|
||||
"tags": "amenity=bicycle_parking;ref:velopark=$ref:velopark",
|
||||
"text": {
|
||||
"en": "Create a new bicycle parking in OSM",
|
||||
"nl": "Maak een nieuwe parking aan in OSM"
|
||||
"en": "Create a new bicycle parking in OSM. This parking will have the link, but not all attributes",
|
||||
"nl": "Maak een nieuwe parking aan in OSM. Deze parking zal gelinkt zijn met Velopark, maar niet de attributen bevatten"
|
||||
},
|
||||
"maproulette_id": "mr_taskId"
|
||||
}
|
||||
|
@ -131,8 +136,8 @@
|
|||
"special": {
|
||||
"type": "maproulette_set_status",
|
||||
"message": {
|
||||
"en": "Mark this item as linked",
|
||||
"nl": "Markeer als gelinkt"
|
||||
"en": "Mark this item as linked manually. Use this if you did apply the reference via copy-paste or via another editor",
|
||||
"nl": "Markeer als gelinkt. Gebruik deze optie indien je de ID plakte in een fietsenstalling of via een andere editor toevoegdemap"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -143,8 +148,8 @@
|
|||
"special": {
|
||||
"type": "maproulette_set_status",
|
||||
"message": {
|
||||
"en": "Mark this item as incorrect (duplicate, does not exist anymore, contradictory data)",
|
||||
"nl": "Markeer dit object als incorrect (duplicaat, incorrect of tegenstrijdige data, ...)"
|
||||
"en": "Mark this item as incorrect or too hard to solve (duplicate, does not exist anymore, contradictory data, not placeable from aerial imagery)",
|
||||
"nl": "Markeer dit object als incorrect of te moeillijk (duplicaat, incorrect of tegenstrijdige data, niet eenduidig te plaatsen adhv luchtfoto's, ...)"
|
||||
},
|
||||
"image": "invalid",
|
||||
"status": 6
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</Loading>
|
||||
{:else if $status === Maproulette.STATUS_OPEN}
|
||||
<button class="no-image-background w-full p-4 m-0" on:click={() => apply()}>
|
||||
<Icon clss="w-8 h-8 mr-2" icon={image} />
|
||||
<Icon clss="w-8 h-8 mr-2 shrink-0" icon={image} />
|
||||
{message}
|
||||
</button>
|
||||
{:else}
|
||||
|
|
|
@ -3,7 +3,11 @@ import { FixedUiElement } from "./Base/FixedUiElement"
|
|||
import BaseUIElement from "./BaseUIElement"
|
||||
import Title from "./Base/Title"
|
||||
import Table from "./Base/Table"
|
||||
import { RenderingSpecification, SpecialVisualization, SpecialVisualizationState } from "./SpecialVisualization"
|
||||
import {
|
||||
RenderingSpecification,
|
||||
SpecialVisualization,
|
||||
SpecialVisualizationState,
|
||||
} from "./SpecialVisualization"
|
||||
import { HistogramViz } from "./Popup/HistogramViz"
|
||||
import { MinimapViz } from "./Popup/MinimapViz"
|
||||
import { ShareLinkViz } from "./Popup/ShareLinkViz"
|
||||
|
@ -1241,6 +1245,10 @@ export default class SpecialVisualizations {
|
|||
doc: "An entire tagRenderingConfig",
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "classes",
|
||||
doc: "CSS-classes to apply on every individual item. Seperated by `space`",
|
||||
},
|
||||
],
|
||||
constr(
|
||||
state: SpecialVisualizationState,
|
||||
|
@ -1249,16 +1257,16 @@ export default class SpecialVisualizations {
|
|||
feature: Feature,
|
||||
layer: LayerConfig
|
||||
) {
|
||||
const [key, tr] = args
|
||||
const [key, tr, classesRaw] = args
|
||||
let classes = classesRaw ?? ""
|
||||
const translation = new Translation({ "*": tr })
|
||||
return new VariableUiElement(
|
||||
featureTags.map((tags) => {
|
||||
console.log("Trying to parse", tags[key], key)
|
||||
let properties: object[]
|
||||
if(typeof tags[key] === "string"){
|
||||
properties =JSON.parse(tags[key])
|
||||
}else{
|
||||
properties = <any> tags[key]
|
||||
if (typeof tags[key] === "string") {
|
||||
properties = JSON.parse(tags[key])
|
||||
} else {
|
||||
properties = <any>tags[key]
|
||||
console.log("Multi properties are", properties)
|
||||
}
|
||||
const elements = []
|
||||
|
@ -1269,7 +1277,7 @@ export default class SpecialVisualizations {
|
|||
state,
|
||||
feature,
|
||||
layer,
|
||||
})
|
||||
}).SetClass(classes)
|
||||
elements.push(subsTr)
|
||||
}
|
||||
return elements
|
||||
|
|
Loading…
Reference in a new issue