{ "id": "note", "name": { "en": "OpenStreetMap notes", "nl": "OpenStreetMap Notes", "de": "OpenStreetMap-Hinweise", "es": "Notas de OpenStreetMap", "ca": "Notes d'OpenStreetMap", "cs": "Poznámky 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 }, "calculatedTags": [ "_total_comments:=get(feat)('comments').length", "_first_comment:=get(feat)('comments')[0].text", "_opened_by_anonymous_user:=get(feat)('comments')[0].user === undefined", "_first_user:=get(feat)('comments')[0].user", "_last_user:=(() => {const comms = get(feat)('comments'); return comms[comms.length - 1].user})()", "_first_user_id:=get(feat)('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|org\\)/\\([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] })()" ], "minzoom": 10, "title": { "render": { "en": "Note", "nl": "Note", "ca": "Nota", "de": "Notiz", "es": "Nota", "pa_PK": "نوٹ", "pl": "Notatka", "cs": "Poznámka" }, "mappings": [ { "if": "closed_at~*", "then": { "en": "Closed note", "nl": "Gesloten Note", "de": "Geschlossene Notiz", "es": "Nota cerrada", "pl": "Zamknięta notatka", "ca": "Nota tancada", "cs": "Uzavřená poznámka" } } ] }, "titleIcons": [ { "render": "" } ], "pointRendering": [ { "location": [ "point", "centroid" ], "marker": [ { "icon": { "render": "./assets/svg/note.svg", "mappings": [ { "if": "closed_at~*", "then": "./assets/svg/resolved.svg" } ] } } ], "iconSize": "40,40", "iconBadges": [ { "if": "_total_comments>1", "then": "circle:white;./assets/svg/speech_bubble.svg" }, { "if": "_is_import_note~*", "then": "./assets/svg/addSmall.svg" } ], "anchor": "bottom" } ], "lineRendering": [], "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": "