forked from MapComplete/MapComplete
Merge branch 'develop' into feature/vite
This commit is contained in:
commit
562dfbc5ff
6 changed files with 140 additions and 5 deletions
|
@ -10,6 +10,7 @@ import { CountryCoder } from "latlon2country"
|
|||
import Constants from "../Models/Constants"
|
||||
import { TagUtils } from "./Tags/TagUtils"
|
||||
import { Feature, LineString } from "geojson"
|
||||
import { OsmObject } from "./Osm/OsmObject"
|
||||
|
||||
export class SimpleMetaTagger {
|
||||
public readonly keys: string[]
|
||||
|
@ -484,6 +485,33 @@ export default class SimpleMetaTaggers {
|
|||
return true
|
||||
}
|
||||
)
|
||||
|
||||
public static referencingWays = new SimpleMetaTagger(
|
||||
{
|
||||
keys: ["_referencing_ways"],
|
||||
isLazy: true,
|
||||
doc: "_referencing_ways contains - for a node - which ways use this this node as point in their geometry.",
|
||||
},
|
||||
(feature, _, __, state) => {
|
||||
const id = feature.properties.id
|
||||
if (!id.startsWith("node/")) {
|
||||
return false
|
||||
}
|
||||
OsmObject.DownloadReferencingWays(id).then((referencingWays) => {
|
||||
const currentTagsSource = state.allElements.getEventSourceById(id)
|
||||
const wayIds = referencingWays.map((w) => "way/" + w.id)
|
||||
wayIds.sort()
|
||||
const wayIdsStr = wayIds.join(";")
|
||||
if (wayIdsStr !== "" && currentTagsSource.data["_referencing_ways"] !== wayIdsStr) {
|
||||
currentTagsSource.data["_referencing_ways"] = wayIdsStr
|
||||
currentTagsSource.ping()
|
||||
}
|
||||
})
|
||||
|
||||
return true
|
||||
}
|
||||
)
|
||||
|
||||
public static metatags: SimpleMetaTagger[] = [
|
||||
SimpleMetaTaggers.latlon,
|
||||
SimpleMetaTaggers.layerInfo,
|
||||
|
@ -499,6 +527,7 @@ export default class SimpleMetaTaggers {
|
|||
SimpleMetaTaggers.noBothButLeftRight,
|
||||
SimpleMetaTaggers.geometryType,
|
||||
SimpleMetaTaggers.levels,
|
||||
SimpleMetaTaggers.referencingWays,
|
||||
]
|
||||
public static readonly lazyTags: string[] = [].concat(
|
||||
...SimpleMetaTaggers.metatags.filter((tagger) => tagger.isLazy).map((tagger) => tagger.keys)
|
||||
|
|
5
Utils.ts
5
Utils.ts
|
@ -466,6 +466,9 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
/**
|
||||
* Copies all key-value pairs of the source into the target. This will change the target
|
||||
* If the key starts with a '+', the values of the list will be appended to the target instead of overwritten
|
||||
* If the key starts with `=`, the property will be overwritten.
|
||||
*
|
||||
* 'Source' will not be modified, but 'Target' will be
|
||||
*
|
||||
* const obj = {someValue: 42};
|
||||
* const override = {someValue: null};
|
||||
|
@ -501,7 +504,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
* result.list2.length // => 1
|
||||
* result.list2[0] // => "should-be-untouched"
|
||||
*/
|
||||
static Merge<T, S>(source: S, target: T): T & S {
|
||||
static Merge<T, S>(source: Readonly<S>, target: T): T & S {
|
||||
if (target === null) {
|
||||
return <T & S>source
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
]
|
||||
},
|
||||
"tagRenderings": [
|
||||
"images",
|
||||
{
|
||||
"id": "name",
|
||||
"question": {
|
||||
|
@ -399,4 +400,4 @@
|
|||
"filter": [
|
||||
"open_now"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
BIN
assets/themes/ghostbikes/botlogo.png
Normal file
BIN
assets/themes/ghostbikes/botlogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
102
assets/themes/ghostbikes/botlogo.svg
Normal file
102
assets/themes/ghostbikes/botlogo.svg
Normal file
|
@ -0,0 +1,102 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="375px"
|
||||
height="375px"
|
||||
viewBox="0 0 375 375"
|
||||
version="1.1"
|
||||
id="svg17"
|
||||
sodipodi:docname="botlogo.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
||||
inkscape:export-filename="/home/pietervdvn/git/MapComplete/assets/themes/ghostbikes/botlogo.png"
|
||||
inkscape:export-xdpi="256"
|
||||
inkscape:export-ydpi="256"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs21" />
|
||||
<sodipodi:namedview
|
||||
id="namedview19"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:pageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.852801"
|
||||
inkscape:cx="233.16049"
|
||||
inkscape:cy="265.27403"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="995"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g3691" />
|
||||
<g
|
||||
id="g3691"
|
||||
transform="translate(12,-6)">
|
||||
<rect
|
||||
style="fill:none;stroke:#ff0000;stroke-width:1.13764;stroke-linejoin:round;stroke-miterlimit:10.6207;stroke-opacity:1"
|
||||
id="rect855"
|
||||
width="251.88741"
|
||||
height="224.90445"
|
||||
x="173.53928"
|
||||
y="200.92909" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:bold;font-size:16px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:center;text-anchor:middle;white-space:pre;inline-size:207.019;fill:none;stroke:#ff0000;stroke-width:1.13764;stroke-linejoin:round;stroke-miterlimit:10.6207;stroke-opacity:1"
|
||||
x="349.92654"
|
||||
y="408.2645"
|
||||
id="text2286"
|
||||
transform="translate(-28,-6)"><tspan
|
||||
x="349.92654"
|
||||
y="408.2645"
|
||||
id="tspan6169"><tspan
|
||||
style="fill:#ff0000;stroke:none"
|
||||
id="tspan6167">Keep this area free for</tspan><tspan
|
||||
y="408.2645"
|
||||
id="tspan6171"> </tspan></tspan><tspan
|
||||
x="349.92654"
|
||||
y="428.2645"
|
||||
id="tspan6175"><tspan
|
||||
style="fill:#ff0000;stroke:none"
|
||||
id="tspan6173">the 'bot' icon in Tusky</tspan></tspan></text>
|
||||
</g>
|
||||
<rect
|
||||
style="fill:#171414;stroke:none;stroke-width:1.13764;stroke-linejoin:round;stroke-miterlimit:10.6207;fill-opacity:1"
|
||||
id="rect1287"
|
||||
width="375.66898"
|
||||
height="375.02924"
|
||||
x="-0.16349041"
|
||||
y="0.25589794" />
|
||||
<g
|
||||
id="g831"
|
||||
transform="translate(36,-162)">
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:9.41179;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
|
||||
d="M 170.66484,296.57539 H 98.361671 l 39.440809,-87.51733 h 98.59902 m 0,0 -10.95611,-24.68712 h 30.67351 m -19.7174,24.68712 4.38364,11.21926 8.76131,17.95319 24.10104,58.34488 m -37.24599,-87.51733 -20.8178,33.65776 -12.4871,20.19584 m -8.32473,13.46788 8.32473,-13.46788 m -49.95436,-29.17245 21.90624,49.37427 -43.81847,-98.74254 13.14493,26.92978 m 43.81847,76.29808 14.90319,-24.68714"
|
||||
id="path6" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4.7059;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
|
||||
d="m 194.26951,292.75989 c 0,7.42766 -5.8608,13.35424 -12.98346,13.35424 -7.1167,0 -12.98348,-5.92658 -12.98348,-13.35424 0,-7.43366 5.86678,-13.36024 12.98348,-13.36024 7.12266,0 12.98346,5.92658 12.98346,13.36024 z m 0,0"
|
||||
id="path8" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:9.41179;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
|
||||
d="m 148.09476,288.2686 c 0,28.49067 -22.52222,51.39564 -50.067992,51.39564 -27.545762,0 -50.073966,-22.90497 -50.073966,-51.39564 0,-28.49068 22.528204,-51.39565 50.073966,-51.39565 27.545772,0 50.067992,22.90497 50.067992,51.39565 z m 0,0"
|
||||
id="path10" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:9.41179;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
|
||||
d="m 320.89872,292.6044 c 0,28.59233 -23.18007,51.76642 -51.76643,51.76642 -28.58637,0 -51.76643,-23.17409 -51.76643,-51.76642 0,-28.58637 23.18006,-51.76045 51.76643,-51.76045 28.58636,0 51.76643,23.17408 51.76643,51.76045 z m 0,0"
|
||||
id="path12" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#fffafa;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.72229"
|
||||
d="M 132.4368,241.85044 H 97.66815 v -29.17121 c 0,-2.31432 -1.951,-4.18462 -4.36623,-4.18462 h -9.73497 c -2.40849,0 -4.36626,1.8703 -4.36626,4.18462 v 29.17121 H 44.43878 c -2.40849,0 -4.36626,1.8703 -4.36626,4.1779 v 9.338 c 0,2.3076 1.95777,4.1779 4.36626,4.1779 h 34.76191 v 87.702 c 0,2.31432 1.95777,4.18462 4.36626,4.18462 h 9.73497 c 2.41523,0 4.36623,-1.8703 4.36623,-4.18462 v -87.702 h 34.76865 c 2.40852,0 4.35954,-1.8703 4.35954,-4.1779 v -9.338 c 0,-2.3076 -1.95102,-4.1779 -4.35954,-4.1779 z m 0,0"
|
||||
id="path14" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1" />
|
||||
</svg>
|
After Width: | Height: | Size: 5.1 KiB |
|
@ -22,8 +22,8 @@
|
|||
"ca": "Bicicletes fantasmes"
|
||||
},
|
||||
"description": {
|
||||
"en": "A <b>ghost bike</b> is a memorial for a cyclist who died in a traffic accident, in the form of a white bicycle placed permanently near the accident location.<br/><br/>On this map, one can see all the ghost bikes which are known by OpenStreetMap. Is a ghost bike missing? Everyone can add or update information here - you only need to have a (free) OpenStreetMap account.",
|
||||
"nl": "Een <b>Witte Fiets</b> of <b>Spookfiets</b> is een aandenken aan een fietser die bij een verkeersongeval om het leven kwam. Het gaat om een fiets die volledig wit is geschilderd en in de buurt van het ongeval werd geinstalleerd.<br/><br/>Op deze kaart zie je alle witte fietsen die door OpenStreetMap gekend zijn. Ontbreekt er een Witte Fiets of wens je informatie aan te passen? Meld je dan aan met een (gratis) OpenStreetMap account.",
|
||||
"en": "A <b>ghost bike</b> is a memorial for a cyclist who died in a traffic accident, in the form of a white bicycle placed permanently near the accident location.<br/><br/>On this map, one can see all the ghost bikes which are known by OpenStreetMap. Is a ghost bike missing? Everyone can add or update information here - you only need to have a (free) OpenStreetMap account.<p>There exists an <a href='https://masto.bike/@ghostbikebot' target='_blank'>automated account on Mastodon which posts a monthly overview of ghost bikes worldwide</a></p>",
|
||||
"nl": "Een <b>Witte Fiets</b> of <b>Spookfiets</b> is een aandenken aan een fietser die bij een verkeersongeval om het leven kwam. Het gaat om een fiets die volledig wit is geschilderd en in de buurt van het ongeval werd geinstalleerd.<br/><br/>Op deze kaart zie je alle witte fietsen die door OpenStreetMap gekend zijn. Ontbreekt er een Witte Fiets of wens je informatie aan te passen? Meld je dan aan met een (gratis) OpenStreetMap account.<p>Bekijk ook <a href='https://masto.bike/@ghostbikebot' target='_blank'>de geautomatiseerde account die maandelijks statistieken over Witte Fietsen post op Mastodon</a></p>",
|
||||
"de": "<b>Geisterräder</b> sind weiße Fahrräder, die zum Gedenken tödlich verunglückter Radfahrer vor Ort aufgestellt wurden.<br/><br/> Auf dieser Karte sehen Sie alle Geisterräder, die in OpenStreetMap eingetragen sind. Fehlt ein Geisterrad? Jeder kann hier Informationen hinzufügen oder aktualisieren - Sie benötigen nur ein (kostenloses) OpenStreetMap-Konto.",
|
||||
"ja": "<b>ゴーストバイク</b>は、交通事故で死亡したサイクリストを記念するもので、事故現場の近くに恒久的に置かれた白い自転車の形をしています。<br/><br/>このマップには、OpenStreetMapで知られているゴーストバイクがすべて表示されます。ゴーストバイクは行方不明ですか?誰でもここで情報の追加や更新ができます。必要なのは(無料の)OpenStreetMapアカウントだけです。",
|
||||
"zh_Hant": "<b>幽靈單車</b>是用來紀念死於交通事故的單車騎士,在事發地點附近放置白色單車。<br/><br/>在這份地圖上面,你可以看到所有在開放街圖已知的幽靈單車。有缺漏的幽靈單車嗎?所有人都可以在這邊新增或是更新資訊-只有你有(免費)開放街圖帳號。",
|
||||
|
@ -44,4 +44,4 @@
|
|||
"clustering": {
|
||||
"maxZoom": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue