forked from MapComplete/MapComplete
Styling tweak
Add mapillary link to nearby_images Fix licenses Add missing assets First version of nearby-images
This commit is contained in:
parent
a4f2fa63a5
commit
7559f9259b
52 changed files with 674 additions and 207 deletions
|
@ -273,4 +273,4 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -59,6 +59,18 @@
|
|||
"id": "comment",
|
||||
"render": "{add_note_comment()}"
|
||||
},
|
||||
{
|
||||
"id": "nearby-images",
|
||||
"render": {
|
||||
"before": {
|
||||
"en": "<h3>Nearby images</h3>The pictures below are nearby geotagged images and might be helpful to handle this note."
|
||||
},
|
||||
"special": {
|
||||
"type": "nearby_images",
|
||||
"mode": "open"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "report-contributor",
|
||||
"render": {
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
{
|
||||
"id": "note_import",
|
||||
"name": {
|
||||
"en": "Possible bookcases",
|
||||
"nl": "Mogelijke publieke boekenkastjes",
|
||||
"de": "Mögliche Bücherschränke"
|
||||
},
|
||||
"description": "Template for note note imports.",
|
||||
"source": {
|
||||
"osmTags": {
|
||||
"and": [
|
||||
"id~*"
|
||||
]
|
||||
},
|
||||
"geoJson": "https://api.openstreetmap.org/api/0.6/notes.json?closed=0&bbox={x_min},{y_min},{x_max},{y_max}",
|
||||
"geoJsonZoomLevel": 12,
|
||||
"maxCacheAge": 0
|
||||
},
|
||||
"minzoom": 10,
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Possible feature",
|
||||
"nl": "Mogelijk object",
|
||||
"de": "Mögliches Objekt"
|
||||
}
|
||||
},
|
||||
"calculatedTags": [
|
||||
"_first_comment:=feat.get('comments')[0].text.toLowerCase()",
|
||||
"_trigger_index:=(() => {const lines = feat.properties['_first_comment'].split('\\n'); const matchesMapCompleteURL = lines.map(l => l.match(\".*https://mapcomplete.osm.be/\\([a-zA-Z_-]+\\)\\(.html\\).*#import\")); const matchedIndexes = matchesMapCompleteURL.map((doesMatch, i) => [doesMatch !== null, i]).filter(v => v[0]).map(v => v[1]); return matchedIndexes[0] })()",
|
||||
"_intro:=(() => {const lines = feat.properties['_first_comment'].split('\\n'); lines.splice(feat.get('_trigger_index')-1, lines.length); return lines.map(l => l == '' ? '<br/>' : l).join('');})()",
|
||||
"_tags:=(() => {let lines = feat.properties['_first_comment'].split('\\n').map(l => l.trim()); lines.splice(0, feat.get('_trigger_index') + 1); lines = lines.filter(l => l != ''); return lines.join(';');})()"
|
||||
],
|
||||
"isShown": {
|
||||
"render": "yes",
|
||||
"mappings": [
|
||||
{
|
||||
"if": "_trigger_index=",
|
||||
"then": "no"
|
||||
}
|
||||
]
|
||||
},
|
||||
"titleIcons": [
|
||||
{
|
||||
"render": "<a href='https://openstreetmap.org/note/{id}' target='_blank'><img src='./assets/svg/osm-logo-us.svg'></a>"
|
||||
}
|
||||
],
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "conversation",
|
||||
"render": "{visualize_note_comments(comments,1)}"
|
||||
},
|
||||
{
|
||||
"id": "Intro",
|
||||
"render": "{_intro}"
|
||||
},
|
||||
{
|
||||
"id": "import",
|
||||
"render": "{import_button(public_bookcase, _tags, There might be a public bookcase here,./assets/svg/addSmall.svg,,,id)}"
|
||||
},
|
||||
{
|
||||
"id": "close_note_",
|
||||
"render": "{close_note(Does not exist<br/>, ./assets/svg/close.svg, id, This feature does not exist)}"
|
||||
},
|
||||
{
|
||||
"id": "close_note_mapped",
|
||||
"render": "{close_note(Already mapped, ./assets/svg/checkmark.svg, id, Already mapped)}"
|
||||
},
|
||||
{
|
||||
"id": "comment",
|
||||
"render": "{add_note_comment()}"
|
||||
},
|
||||
{
|
||||
"id": "add_image",
|
||||
"render": "{add_image_to_note()}"
|
||||
}
|
||||
],
|
||||
"mapRendering": [
|
||||
{
|
||||
"location": [
|
||||
"point",
|
||||
"centroid"
|
||||
],
|
||||
"icon": {
|
||||
"render": "teardrop:#3333cc"
|
||||
},
|
||||
"iconSize": "40,40,bottom"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue