2022-01-07 04:14:53 +01:00
{
"id" : "notes" ,
"language" : [
"en"
] ,
"maintainer" : "MapComplete" ,
"startLat" : 0 ,
"startLon" : 0 ,
"startZoom" : 0 ,
"title" : "Notes on OpenStreetMap" ,
"version" : "0.1" ,
2022-01-08 04:22:50 +01:00
"description" : "A note is a pin on the map with some text to indicate something wrong.<br/><br/>Make sure to checkout the <a href='#filters'>filter view</a> to search for users and text." ,
"icon" : "./assets/svg/resolved.svg" ,
2022-01-07 04:14:53 +01:00
"clustering" : false ,
2022-01-07 17:31:39 +01:00
"enableDownload" : true ,
2022-01-07 04:14:53 +01:00
"layers" : [
{
"id" : "notes" ,
"name" : {
"en" : "OpenStreetMap notes"
} ,
2022-01-08 04:22:50 +01:00
"description" : "This layer shows notes on OpenStreetMap." ,
2022-01-07 04:14:53 +01:00
"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
} ,
2022-01-07 17:31:39 +01:00
"minzoom" : 8 ,
2022-01-07 04:14:53 +01:00
"title" : {
"render" : {
2022-01-07 17:31:39 +01:00
"en" : "Note"
2022-01-07 04:14:53 +01:00
} ,
2022-01-07 17:31:39 +01:00
"mappings" : [
{
"if" : "closed_at~*" ,
"then" : {
"en" : "Closed note"
}
2022-01-07 04:14:53 +01:00
}
2022-01-07 17:31:39 +01:00
]
2022-01-07 04:14:53 +01:00
} ,
"calculatedTags" : [
2022-01-07 17:31:39 +01:00
"_first_comment:=feat.get('comments')[0].text.toLowerCase()" ,
2022-01-08 04:22:50 +01:00
"_opened_by_anonymous_user:=feat.get('comments')[0].user === undefined" ,
"_first_user:=feat.get('comments')[0].user" ,
"_first_user_lc:=feat.get('comments')[0].user?.toLowerCase()" ,
"_first_user_id:=feat.get('comments')[0].uid"
2022-01-07 17:31:39 +01:00
] ,
"titleIcons" : [
{
"render" : "<a href='https://openstreetmap.org/note/{id}' target='_blank'><img src='./assets/svg/osm-logo-us.svg'></a>"
}
2022-01-07 04:14:53 +01:00
] ,
"tagRenderings" : [
{
"id" : "conversation" ,
2022-01-08 04:22:50 +01:00
"render" : "{visualize_note_comments()}"
2022-01-07 04:14:53 +01:00
} ,
2022-01-08 14:08:04 +01:00
{
"id" : "add_image" ,
"render" : "{add_image_to_note()}"
} ,
2022-01-07 04:14:53 +01:00
{
2022-01-08 04:22:50 +01:00
"id" : "comment" ,
"render" : "{add_note_comment()}"
2022-01-07 04:14:53 +01:00
} ,
{
2022-01-08 17:44:23 +01:00
"id" : "report-contributor" ,
2022-01-08 04:22:50 +01:00
"render" : {
"en" : "<a href='https://www.openstreetmap.org/reports/new?reportable_id={_first_user_id}&reportable_type=User' target='_blank' class='subtle'>Report {_first_user} as spam</a>"
} ,
"condition" : "_opened_by_anonymous_user=false"
2022-01-08 17:44:23 +01:00
} ,
{
"id" : "report-note" ,
"render" : {
"en" : "<a href='https://www.openstreetmap.org/reports/new?reportable_id={id}&reportable_type=Note' target='_blank'>Report this note as spam or inappropriate</a>"
}
2022-01-07 04:14:53 +01:00
}
] ,
"mapRendering" : [
{
"location" : [
"point" ,
"centroid"
] ,
"icon" : {
2022-01-08 04:22:50 +01:00
"render" : "./assets/svg/note.svg" ,
2022-01-07 04:14:53 +01:00
"mappings" : [
{
"if" : "closed_at~*" ,
2022-01-08 04:22:50 +01:00
"then" : "./assets/svg/resolved.svg"
2022-01-07 04:14:53 +01:00
}
]
} ,
"iconSize" : "40,40,bottom"
}
] ,
2022-01-07 17:31:39 +01:00
"filter" : [
{
"id" : "search" ,
"options" : [
{
"osmTags" : "_first_comment~.*{search}.*" ,
"fields" : [
{
"name" : "search"
}
] ,
"question" : {
"en" : "Should mention {search} in the first comment"
}
}
]
2022-01-07 17:33:41 +01:00
} ,
{
"id" : "not" ,
"options" : [
{
"osmTags" : "_first_comment!~.*{search}.*" ,
"fields" : [
{
"name" : "search"
}
] ,
"question" : {
"en" : "Should <b>not</b> mention {search} in the first comment"
}
}
]
2022-01-08 04:22:50 +01:00
} ,
{
"id" : "opened_by" ,
"options" : [
{
"osmTags" : "_first_user_lc~.*{search}.*" ,
"fields" : [
{
"name" : "search"
}
] ,
"question" : {
"en" : "Opened by {search}"
}
}
]
} ,
{
"id" : "not_opened_by" ,
"options" : [
{
"osmTags" : "_first_user_lc!~.*{search}.*" ,
"fields" : [
{
"name" : "search"
}
] ,
"question" : {
"en" : "<b>Not</b> opened by {search}"
}
}
]
} ,
{
"id" : "anonymous" ,
"options" : [
{
"osmTags" : "_opened_by_anonymous_user=true" ,
"question" : {
"en" : "Opened by anonymous user"
}
}
]
2022-01-07 17:31:39 +01:00
}
]
2022-01-07 04:14:53 +01:00
}
]
}