Import work

This commit is contained in:
Pieter Vander Vennet 2022-01-10 19:10:13 +01:00
parent 42a6b37ca6
commit e0b58a0f55
3 changed files with 68 additions and 4 deletions

View file

@ -0,0 +1,54 @@
{
"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"
}
]
}

View file

@ -43,6 +43,7 @@
"startZoom": 1,
"widenFactor": 1,
"layers": [
"public_bookcase"
"public_bookcase",
"note_import"
]
}