diff --git a/assets/layers/maproulette_challenge/maproulette_challenge.json b/assets/layers/maproulette_challenge/maproulette_challenge.json new file mode 100644 index 000000000..23060925b --- /dev/null +++ b/assets/layers/maproulette_challenge/maproulette_challenge.json @@ -0,0 +1,190 @@ +{ + "id": "maproulette_challenge", + "name": null, + "description": { + "en": "Layer showing tasks of a MapRoulette challenge" + }, + "source": { + "osmTags": "id~*", + "geoJson": "https://maproulette.org/api/v2/challenge/view/27971", + "isOsmCache": false + }, + "title": { + "render": { + "en": "Item in MapRoulette" + } + }, + "titleIcons":[ + { + "id": "maproulette", + "render": "" + } + ], + "mapRendering": [ + { + "location": [ + "point", + "centroid" + ], + "icon": { + "render": "./assets/layers/maproulette/logomark.svg", + "mappings": [ + { + "if": "mr_taskStatus=Created", + "then": "pin:#959DFF" + }, + { + "if": "mr_taskStatus=Fixed", + "then": "pin:#65D2DA" + }, + { + "if": "mr_taskStatus=False positive", + "then": "pin:#F7BB59" + }, + { + "if": "mr_taskStatus=Skipped", + "then": "pin:#F7BB59" + }, + { + "if": "mr_taskStatus=Deleted", + "then": "pin:#737373" + }, + { + "if": "mr_taskStatus=Already fixed", + "then": "pin:#CCB186" + }, + { + "if": "mr_taskStatus=Too hard", + "then": "pin:#FF5E63" + }, + { + "if": "mr_taskStatus=Disabled", + "then": "pin:#FF349C" + } + ] + }, + "iconSize": "40,40,center" + } + ], + "tagRenderings": [ + { + "id": "status", + "render": "Current status: {status}", + "mappings": [ + { + "if": "mr_taskStatus=Created", + "then": { + "en": "Task is created" + } + }, + { + "if": "mr_taskStatus=Fixed", + "then": { + "en": "Task is fixed" + } + }, + { + "if": "mr_taskStatus=False positive", + "then": { + "en": "Task is a false positive" + } + }, + { + "if": "mr_taskStatus=Skipped", + "then": { + "en": "Task is skipped" + } + }, + { + "if": "mr_taskStatus=Deleted", + "then": { + "en": "Task is deleted" + } + }, + { + "if": "mr_taskStatus=Already fixed", + "then": { + "en": "Task is already fixed" + } + }, + { + "if": "mr_taskStatus=Too hard", + "then": { + "en": "Task is marked as too hard" + } + }, + { + "if": "mr_taskStatus=Disabled", + "then": { + "en": "Task is disabled" + } + } + ] + }, + { + "id": "blurb", + "condition": "blurb~*", + "render": "{blurb}" + } + ], + "filter": [ + { + "id": "status", + "options": [ + { + "question": { + "en": "Show tasks with all statuses" + } + }, + { + "question": { + "en": "Show tasks that are created" + }, + "osmTags": "mr_taskStatus=Created" + }, + { + "question": { + "en": "Show tasks that are fixed" + }, + "osmTags": "mr_taskStatus=Fixed" + }, + { + "question": { + "en": "Show tasks that are false positives" + }, + "osmTags": "mr_taskStatus=False positive" + }, + { + "question": { + "en": "Show tasks that are skipped" + }, + "osmTags": "mr_taskStatus=Skipped" + }, + { + "question": { + "en": "Show tasks that are deleted" + }, + "osmTags": "mr_taskStatus=Deleted" + }, + { + "question": { + "en": "Show tasks that are already fixed" + }, + "osmTags": "mr_taskStatus=Already fixed" + }, + { + "question": { + "en": "Show tasks that are marked as too hard" + }, + "osmTags": "mr_taskStatus=Too hard" + }, + { + "question": { + "en": "Show tasks that are disabled" + }, + "osmTags": "mr_taskStatus=Disabled" + } + ] + } + ] +} \ No newline at end of file diff --git a/assets/themes/street_lighting/street_lighting_assen.json b/assets/themes/street_lighting/street_lighting_assen.json index 0ca7388ed..ce7e0e485 100644 --- a/assets/themes/street_lighting/street_lighting_assen.json +++ b/assets/themes/street_lighting/street_lighting_assen.json @@ -53,41 +53,20 @@ ] }, { - "id": "maproulette", - "name": "Maproulette Tasks", - "source": { - "osmTags": "id~*", - "geoJson": "https://maproulette.org/api/v2/challenge/view/27971", - "isOsmCache": false - }, - "calculatedTags": [ - "_closest_osm_street_lamp=feat.closest('street_lamps')?.properties?.id", - "_closest_osm_street_lamp_distance=feat.distanceTo(feat.properties._closest_osm_street_lamp)", - "_has_closeby_feature=Number(feat.properties._closest_osm_street_lamp_distance) < 5 ? 'yes' : 'no'" - ], - "title": "Straatlantaarn in Maproulette", - "mapRendering": [ - { - "location": [ - "point", - "centroid" - ], - "icon": "circle:black", - "iconSize": "20,20,center" - } - ], - "tagRenderings": [ - "all_tags", - { - "id": "link", - "render": "View this task" - }, - { - "id": "import", - - "render": "{import_button(street_lamps,tags,Import,./assets/svg/addSmall.svg,,,,photo,mr_taskId)}" - } - ] + "builtin": "maproulette_challenge", + "override": { + "calculatedTags": [ + "_closest_osm_street_lamp=feat.closest('street_lamps')?.properties?.id", + "_closest_osm_street_lamp_distance=feat.distanceTo(feat.properties._closest_osm_street_lamp)", + "_has_closeby_feature=Number(feat.properties._closest_osm_street_lamp_distance) < 5 ? 'yes' : 'no'" + ], + "tagRenderings+": [ + { + "id": "import", + "render": "{import_button(street_lamps,tags,Import,./assets/svg/addSmall.svg,,,,photo,mr_taskId)}" + } + ] + } } ], "hideFromOverview": true