forked from MapComplete/MapComplete
		
	
		
			
				
	
	
		
			342 lines
		
	
	
		
			No EOL
		
	
	
		
			11 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			342 lines
		
	
	
		
			No EOL
		
	
	
		
			11 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
| {
 | |
|   "id": "note",
 | |
|   "name": {
 | |
|     "en": "OpenStreetMap notes",
 | |
|     "nl": "OpenStreetMap Notes",
 | |
|     "de": "OpenStreetMap-Hinweise",
 | |
|     "es": "Notas de 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?limit=10000&closed=7&bbox={x_min},{y_min},{x_max},{y_max}",
 | |
|     "geoJsonZoomLevel": 12,
 | |
|     "maxCacheAge": 0
 | |
|   },
 | |
|   "minzoom": 10,
 | |
|   "title": {
 | |
|     "render": {
 | |
|       "en": "Note",
 | |
|       "nl": "Note",
 | |
|       "ca": "Nota",
 | |
|       "de": "Notiz",
 | |
|       "es": "Nota"
 | |
|     },
 | |
|     "mappings": [
 | |
|       {
 | |
|         "if": "closed_at~*",
 | |
|         "then": {
 | |
|           "en": "Closed note",
 | |
|           "nl": "Gesloten Note",
 | |
|           "de": "Geschlossene Notiz",
 | |
|           "es": "Nota cerrada"
 | |
|         }
 | |
|       }
 | |
|     ]
 | |
|   },
 | |
|   "calculatedTags": [
 | |
|     "_total_comments:=feat.get('comments').length",
 | |
|     "_first_comment:=feat.get('comments')[0].text",
 | |
|     "_opened_by_anonymous_user:=feat.get('comments')[0].user === undefined",
 | |
|     "_first_user:=feat.get('comments')[0].user",
 | |
|     "_last_user:=(() => {const comms = feat.get('comments'); return comms[comms.length - 1].user})()",
 | |
|     "_first_user_id:=feat.get('comments')[0].uid",
 | |
|     "_is_import_note:=(() => {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] })()"
 | |
|   ],
 | |
|   "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()}"
 | |
|     },
 | |
|     {
 | |
|       "id": "add_image",
 | |
|       "render": "{add_image_to_note()}"
 | |
|     },
 | |
|     {
 | |
|       "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.",
 | |
|           "de": "<h3>Bilder aus der Nähe</h3>Die folgenden Bilder sind mit Geotags versehene Bilder aus der Nähe und könnten für die Bearbeitung dieser Notiz hilfreich sein.",
 | |
|           "es": "<h3>Imágenes cercanas</h3>Las imágenes de debajo son imágenes geoetiquetadas cercanas y pueden ser útiles para encargarse de esta nota.",
 | |
|           "nl": "<h3>Afbeeldingen in de buurt</h3>Onderstaande afbeeldingen zijn afbeeldingen met geo-referentie en die in de buurt genomen zijn. Mogelijks zijn ze nuttig om deze kaartnota af te handelen."
 | |
|         },
 | |
|         "special": {
 | |
|           "type": "nearby_images",
 | |
|           "mode": "open"
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     {
 | |
|       "id": "report-contributor",
 | |
|       "render": {
 | |
|         "en": "<a href='https://www.openstreetmap.org/reports/new?reportable_id={_first_user_id}&reportable_type=User' target='_blank' class='subtle'>Report {_first_user} as spam</a>",
 | |
|         "nl": "<a href='https://www.openstreetmap.org/reports/new?reportable_id={_first_user_id}&reportable_type=User' target='_blank' class='subtle'>{_first_user} melden als spam</a>",
 | |
|         "de": "<a href='https://www.openstreetmap.org/reports/new?reportable_id={_first_user_id}&reportable_type=User' target='_blank' class='subtle'>{_first_user} als Spam melden</a>",
 | |
|         "es": "<a href='https://www.openstreetmap.org/reports/new?reportable_id={_first_user_id}&reportable_type=User' target='_blank' class='subtle'>Reportar {_first_user}"
 | |
|       },
 | |
|       "condition": "_opened_by_anonymous_user=false"
 | |
|     },
 | |
|     {
 | |
|       "id": "report-note",
 | |
|       "render": {
 | |
|         "en": "<a href='https://www.openstreetmap.org/reports/new?reportable_id={id}&reportable_type=Note' target='_blank'>Report this note as spam or inappropriate</a>",
 | |
|         "nl": "<a href='https://www.openstreetmap.org/reports/new?reportable_id={id}&reportable_type=Note' target='_blank'>Deze note melden als spam of ongepast</a>",
 | |
|         "de": "<a href='https://www.openstreetmap.org/reports/new?reportable_id={id}&reportable_type=Note' target='_blank'>Notiz als Spam oder unangemessen melden</a>",
 | |
|         "es": "<a href='https://www.openstreetmap.org/reports/new?reportable_id={id}&reportable_type=Note' target='_blank'>Reporta esta nota como spam o inapropiada</a>"
 | |
|       }
 | |
|     }
 | |
|   ],
 | |
|   "mapRendering": [
 | |
|     {
 | |
|       "location": [
 | |
|         "point",
 | |
|         "centroid"
 | |
|       ],
 | |
|       "icon": {
 | |
|         "render": "./assets/svg/note.svg",
 | |
|         "mappings": [
 | |
|           {
 | |
|             "if": "closed_at~*",
 | |
|             "then": "./assets/svg/resolved.svg"
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "iconSize": "40,40,bottom",
 | |
|       "iconBadges": [
 | |
|         {
 | |
|           "if": "_total_comments>1",
 | |
|           "then": "circle:white;speech_bubble"
 | |
|         },
 | |
|         {
 | |
|           "if": "_is_import_note~*",
 | |
|           "then": "addSmall"
 | |
|         }
 | |
|       ]
 | |
|     }
 | |
|   ],
 | |
|   "filter": [
 | |
|     {
 | |
|       "id": "search",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "_first_comment~i~.*{search}.*",
 | |
|           "fields": [
 | |
|             {
 | |
|               "name": "search"
 | |
|             }
 | |
|           ],
 | |
|           "question": {
 | |
|             "en": "Should mention {search} in the first comment",
 | |
|             "nl": "Moet in de eerste opmerking \"{search}\" bevatten",
 | |
|             "de": "Sollte {search} im ersten Kommentar erwähnen",
 | |
|             "es": "Debe mencionar {search} en el primer comentario"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "not",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "_first_comment!~i~.*{search}.*",
 | |
|           "fields": [
 | |
|             {
 | |
|               "name": "search"
 | |
|             }
 | |
|           ],
 | |
|           "question": {
 | |
|             "en": "Should <b>not</b> mention {search} in the first comment",
 | |
|             "nl": "Mag in de eerste opmerking <b>niet</b> \"{search}\" bevatten",
 | |
|             "de": "Sollte <b>nicht</b> {search} im ersten Kommentar erwähnen",
 | |
|             "es": "<b>No</b> debe mencionar {search} en el primer comentario"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "opened_by",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "_first_user~i~.*{search}.*",
 | |
|           "fields": [
 | |
|             {
 | |
|               "name": "search"
 | |
|             }
 | |
|           ],
 | |
|           "question": {
 | |
|             "en": "Opened by contributor {search}",
 | |
|             "nl": "Geopend door bijdrager {search}",
 | |
|             "de": "Erstellt von {search}",
 | |
|             "es": "Abierto por el contributor {search}"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "not_opened_by",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "_first_user!~i~.*{search}.*",
 | |
|           "fields": [
 | |
|             {
 | |
|               "name": "search"
 | |
|             }
 | |
|           ],
 | |
|           "question": {
 | |
|             "en": "<b>Not</b> opened by contributor {search}",
 | |
|             "nl": "<b>Niet</b> geopend door bijdrager {search}",
 | |
|             "de": "<b>Nicht</b> erstellt von {search}",
 | |
|             "es": "<b>No</b> abierto por el contributor {search}"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "edited_by",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "_last_user~i~.*{search}.*",
 | |
|           "fields": [
 | |
|             {
 | |
|               "name": "search"
 | |
|             }
 | |
|           ],
 | |
|           "question": {
 | |
|             "en": "Last edited by contributor {search}",
 | |
|             "nl": "Laatst bewerkt door bijdrager {search}",
 | |
|             "de": "Zuletzt bearbeitet von {search}",
 | |
|             "es": "Editada por última vez por el contributor {search}"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "not_edited_by",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "_last_user!~i~.*{search}.*",
 | |
|           "fields": [
 | |
|             {
 | |
|               "name": "search"
 | |
|             }
 | |
|           ],
 | |
|           "question": {
 | |
|             "en": "Opened after {search}",
 | |
|             "nl": "Geopend na {search}",
 | |
|             "de": "Zuletzt bearbeitet nach dem {search}",
 | |
|             "es": "Abierta después de {search}"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "opened_before",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "date_created<{search}",
 | |
|           "fields": [
 | |
|             {
 | |
|               "name": "search",
 | |
|               "type": "date"
 | |
|             }
 | |
|           ],
 | |
|           "question": {
 | |
|             "en": "Created before {search}",
 | |
|             "nl": "Aangemaakt voor {search}",
 | |
|             "de": "Erstellt vor dem {search}",
 | |
|             "es": "Creada antes de {search}"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "opened_after",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "date_created>{search}",
 | |
|           "fields": [
 | |
|             {
 | |
|               "name": "search",
 | |
|               "type": "date"
 | |
|             }
 | |
|           ],
 | |
|           "question": {
 | |
|             "en": "Created after {search}",
 | |
|             "nl": "Aangemaakt na {search}",
 | |
|             "de": "Erstellt nach dem {search}",
 | |
|             "es": "Creada después de {search}"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "anonymous",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "_opened_by_anonymous_user=true",
 | |
|           "question": {
 | |
|             "en": "Only show notes opened by an anonymous contributor",
 | |
|             "nl": "Toon enkel de Notes geopend door een anonieme bijdrager",
 | |
|             "de": "Nur Notizen anzeigen, die anonym erstellt wurden",
 | |
|             "es": "Solo mostrar las notas abiertas por contributores anómimos"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "is_open",
 | |
|       "options": [
 | |
|         {
 | |
|           "osmTags": "closed_at=",
 | |
|           "question": {
 | |
|             "en": "Only show open notes",
 | |
|             "nl": "Toon enkel open Notes",
 | |
|             "de": "Nur offene Notizen anzeigen",
 | |
|             "es": "Solo mostrar las notas abiertas"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     {
 | |
|       "id": "no_imports",
 | |
|       "options": [
 | |
|         {
 | |
|           "question": {
 | |
|             "en": "All Notes",
 | |
|             "nl": "Alle Notes",
 | |
|             "de": "Alle Notizen",
 | |
|             "es": "Todas las notas"
 | |
|           }
 | |
|         },
 | |
|         {
 | |
|           "osmTags": "_is_import_note=",
 | |
|           "question": {
 | |
|             "en": "Hide import notes",
 | |
|             "nl": "Verberg import Notes",
 | |
|             "de": "Importnotizen ausblenden",
 | |
|             "es": "Ocultar las nostras de importación"
 | |
|           }
 | |
|         },
 | |
|         {
 | |
|           "osmTags": "_is_import_note~*",
 | |
|           "question": {
 | |
|             "en": "Show only import Notes",
 | |
|             "nl": "Toon enkel import Notes",
 | |
|             "de": "Nur Importnotizen anzeigen",
 | |
|             "es": "Solo mostrar las notas de importación"
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     }
 | |
|   ]
 | |
| } |