mapcomplete/assets/layers/note_import/note_import.json

54 lines
1.2 KiB
JSON
Raw Normal View History

2022-01-10 19:10:13 +01:00
{
"id": "note_import",
"description": "Te template for note note imports.",
"source": {
"osmTags": {
"and": ["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": 10,
"title": {
"render": {
"en": "Possible feature"
}
},
"calculatedTags": [
"_first_comment:=feat.get('comments')[0].text.toLowerCase()",
"_is_import_comment:=(() => {const parsed = feat.properties._first_comment.match('\\(.*\\)https:\\/\\/mapcomplete\\.osm\\.be\\/\\([a-zA-Z0-9_-]*\\)[^\\n]*}')()"
],
"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()}"
}
],
"mapRendering": [
{
"location": [
"point",
"centroid"
],
"icon": {
"render": "teardrop:#3333cc"
},
"iconSize": "40,40,bottom"
}
]
}