Add safety check in the case tag calculation failed
This commit is contained in:
parent
d562e7fd7c
commit
deea498b9b
1 changed files with 12 additions and 0 deletions
|
@ -196,6 +196,18 @@
|
||||||
"id": "Import button",
|
"id": "Import button",
|
||||||
"render": "{import_way_button(osm:buildings, building=$_bag_obj:building; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date, Upload this building to OpenStreetMap)}",
|
"render": "{import_way_button(osm:buildings, building=$_bag_obj:building; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date, Upload this building to OpenStreetMap)}",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
|
{
|
||||||
|
"#": "Something went wrong calculating the tags - don't show an import button",
|
||||||
|
"if": {
|
||||||
|
"or": [
|
||||||
|
"_bag_obj:building=",
|
||||||
|
"_bag_obj:ref:bag"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"en": "Didn't calculate the correct values yet. Refresh this page"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"if": "_overlaps_with!=",
|
"if": "_overlaps_with!=",
|
||||||
"then": "{conflate_button(osm:buildings, building=$_bag_obj:building; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date, Replace the geometry in OpenStreetMap, , _osm_obj:id)}"
|
"then": "{conflate_button(osm:buildings, building=$_bag_obj:building; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date, Replace the geometry in OpenStreetMap, , _osm_obj:id)}"
|
||||||
|
|
Loading…
Reference in a new issue