{ "id": "notes", "language": [ "en" ], "maintainer": "MapComplete", "startLat": 0, "startLon": 0, "startZoom": 0, "title": "Notes on OpenStreetMap", "version": "0.1", "description": "Notes from OpenStreetMap", "icon": "./assets/themes/notes/resolved.svg", "clustering": false, "enableDownload": true, "layers": [ { "id": "notes", "name": { "en": "OpenStreetMap notes" }, "description": "Notes on OpenStreetMap.org", "source": { "osmTags": "id~*", "geoJson": "https://api.openstreetmap.org/api/0.6/notes.json?closed=7&bbox={x_min},{y_min},{x_max},{y_max}", "geoJsonZoomLevel": 12, "maxCacheAge": 0 }, "minzoom": 8, "title": { "render": { "en": "Note" }, "mappings": [ { "if": "closed_at~*", "then": { "en": "Closed note" } } ] }, "calculatedTags": [ "_first_comment:=feat.get('comments')[0].text.toLowerCase()", "_conversation=feat.get('comments').map(c => { let user = 'anonymous user'; if(c.user_url !== undefined){user = ''+c.user+''}; return c.html +'
' + user + ' '+c.date+'
' }).join('')" ], "titleIcons": [ { "render": "" } ], "tagRenderings": [ { "id": "conversation", "render": "{_conversation}" }, { "id": "date_created", "render": { "en": "Opened on {date_created}" } }, { "id": "close", "render": "{close_note()}", "condition": "closed_at=" } ], "mapRendering": [ { "location": [ "point", "centroid" ], "icon": { "render": "./assets/themes/notes/note.svg", "mappings": [ { "if": "closed_at~*", "then": "./assets/themes/notes/resolved.svg" } ] }, "iconSize": "40,40,bottom" } ], "filter": [ { "id": "search", "options": [ { "osmTags": "_first_comment~.*{search}.*", "fields": [ { "name": "search" } ], "question": { "en": "Should mention {search} in the first comment" } } ] } ] } ] }