Add 'add new note' functionality, fix bug where 'test'-theme comes up when deleting images

This commit is contained in:
Pieter Vander Vennet 2022-01-14 01:41:19 +01:00
parent e562975f6b
commit 6ae8ec8036
16 changed files with 212 additions and 59 deletions

View file

@ -3,7 +3,7 @@
"name": {
"en": "OpenStreetMap notes"
},
"description": "This layer shows notes on OpenStreetMap.",
"description": "This layer shows notes on OpenStreetMap. Having this layer in your theme will trigger the 'add new note' functionality in the 'addNewPoint'-popup (or if your theme has no presets, it'll enable adding notes)",
"source": {
"osmTags": "id~*",
"geoJson": "https://api.openstreetmap.org/api/0.6/notes.json?closed=7&bbox={x_min},{y_min},{x_max},{y_max}",

View file

@ -28,10 +28,12 @@
],
"isShown": {
"render": "yes",
"mappings": [{
"if": "_trigger_index=",
"then": "no"
}]
"mappings": [
{
"if": "_trigger_index=",
"then": "no"
}
]
},
"titleIcons": [
{
@ -59,7 +61,6 @@
"id": "close_note_mapped",
"render": "{close_note(Already mapped, ./assets/svg/checkmark.svg, id, Already mapped)}"
},
{
"id": "comment",
"render": "{add_note_comment()}"