{
"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": "date_created~*",
"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,
"isOsmCache": false
},
"minzoom": 10,
"title": {
"render": {
"en": "Note",
"nl": "Note",
"ca": "Nota",
"de": "Notiz",
"es": "Nota",
"pa_PK": "نوٹ"
},
"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": ""
}
],
"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": "