Skip to content

Commit

Permalink
Add Road Closed preset and render style
Browse files Browse the repository at this point in the history
(re: #5599)
  • Loading branch information
bhousel committed Dec 17, 2018
1 parent 3f2cf67 commit 029f702
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 5 deletions.
36 changes: 32 additions & 4 deletions css/50_misc.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ path.line.casing.tag-power {
}

/* pipeline */

path.line.stroke.tag-man_made-pipeline {
stroke: #cbd0d8;
stroke-linecap: butt;
Expand Down Expand Up @@ -84,7 +83,6 @@ path.line.casing.tag-natural-tree_row {
path.line.stroke.tag-natural-tree_row {
stroke-width: 5;
}

.low-zoom path.line.shadow.tag-natural-tree_row {
stroke-width: 12;
}
Expand Down Expand Up @@ -123,7 +121,6 @@ path.line.casing.tag-bridge {
stroke-linecap: butt;
stroke-dasharray: none;
}

path.line.shadow.tag-bridge {
stroke-width: 24;
}
Expand Down Expand Up @@ -250,7 +247,7 @@ path.line.casing.tag-bridge.tag-unpaved {
}


/* Status (e.g. construction, proposed, abandoned) */
/* Status (e.g. proposed, abandoned) */
path.area.stroke.tag-status,
path.line.stroke.tag-status,
path.area.casing.tag-status,
Expand All @@ -265,6 +262,37 @@ path.line.casing.tag-status {
stroke-dasharray: 5, 2;
}

/* Road Closed Status */
.preset-icon .icon.iD-highway-construction {
color: #fc6c14;
fill: #fff;
}
path.line.shadow.tag-status.tag-status-construction {
stroke-width: 20;
}
path.line.casing.tag-status.tag-status-construction {
stroke: #fff;
stroke-width: 10;
stroke-linecap: butt;
stroke-dasharray: none
}
path.line.stroke.tag-status.tag-status-construction {
stroke: #fc6c14;
stroke-width: 8;
stroke-linecap: butt;
stroke-dasharray: 10, 10;
}
.low-zoom path.line.shadow.tag-status.tag-status-construction {
stroke-width: 16;
}
.low-zoom path.line.casing.tag-status.tag-status-construction {
stroke-width: 7;
}
.low-zoom path.line.stroke.tag-status.tag-status-construction {
stroke-width: 5;
stroke-dasharray: 8, 8;
}


/* Buildings */
path.stroke.tag-building {
Expand Down
11 changes: 11 additions & 0 deletions data/presets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ en:
castle_type:
# castle_type=*
label: Type
check_date:
# check_date=*
label: Last Checked Date
clothes:
# clothes=*
label: Clothes
Expand Down Expand Up @@ -1114,6 +1117,9 @@ en:
undefined: Assumed to be Yes
# oneway=yes
'yes': 'Yes'
opening_date:
# opening_date=*
label: Expected Opening Date
opening_hours:
# opening_hours=*
label: Hours
Expand Down Expand Up @@ -3826,6 +3832,11 @@ en:
highway/bus_stop:
# highway=bus_stop
name: Bus Stop / Platform
highway/construction:
# 'highway=construction, access=no'
name: Road Closed
# 'terms: closed,closure,construction'
terms: '<translate with synonyms or related terms for ''Road Closed'', separated by commas>'
highway/corridor:
# highway=corridor
name: Indoor Corridor
Expand Down
2 changes: 2 additions & 0 deletions data/presets/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"capacity": {"key": "capacity", "type": "number", "minValue": 0, "label": "Capacity", "placeholder": "50, 100, 200..."},
"cash_in": {"key": "cash_in", "type": "check", "label": "Cash In"},
"castle_type": {"key": "castle_type", "type": "combo", "label": "Type"},
"check_date": {"key": "check_date", "type": "text", "label": "Last Checked Date"},
"clothes": {"key": "clothes", "type": "semiCombo", "label": "Clothes"},
"club": {"key": "club", "type": "typeCombo", "label": "Type"},
"collection_times": {"key": "collection_times", "type": "text", "label": "Collection Times"},
Expand Down Expand Up @@ -196,6 +197,7 @@
"office": {"key": "office", "type": "typeCombo", "label": "Type"},
"oneway_yes": {"key": "oneway", "type": "onewayCheck", "label": "One Way", "strings": {"options": {"undefined": "Assumed to be Yes", "yes": "Yes", "no": "No", "reversible": "Reversible", "alternating": "Alternating"}}},
"oneway": {"key": "oneway", "type": "onewayCheck", "label": "One Way", "strings": {"options": {"undefined": "Assumed to be No", "yes": "Yes", "no": "No", "reversible": "Reversible", "alternating": "Alternating"}}},
"opening_date": {"key": "opening_date", "type": "text", "label": "Expected Opening Date"},
"opening_hours": {"key": "opening_hours", "type": "combo", "label": "Hours", "snake_case": false},
"operator": {"key": "operator", "type": "text", "label": "Operator"},
"outdoor_seating": {"key": "outdoor_seating", "type": "check", "label": "Outdoor Seating"},
Expand Down
5 changes: 5 additions & 0 deletions data/presets/fields/check_date.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"key": "check_date",
"type": "text",
"label": "Last Checked Date"
}
5 changes: 5 additions & 0 deletions data/presets/fields/opening_date.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"key": "opening_date",
"type": "text",
"label": "Expected Opening Date"
}
1 change: 1 addition & 0 deletions data/presets/presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@
"highway/bus_stop": {"icon": "maki-bus", "fields": ["name", "network", "operator", "bench", "shelter"], "geometry": ["point", "vertex"], "tags": {"highway": "bus_stop"}, "name": "Bus Stop / Platform", "searchable": false},
"highway/bridleway": {"fields": ["name", "surface", "width", "structure", "access"], "icon": "iD-highway-bridleway", "geometry": ["line"], "tags": {"highway": "bridleway"}, "terms": ["bridleway", "equestrian", "horse", "trail"], "name": "Bridle Path"},
"highway/bus_guideway": {"icon": "iD-highway-bus-guideway", "fields": ["name", "operator", "oneway"], "geometry": ["line"], "tags": {"highway": "bus_guideway"}, "addTags": {"highway": "bus_guideway", "access": "no", "bus": "designated"}, "removeTags": {"highway": "bus_guideway", "access": "no", "bus": "designated"}, "terms": [], "name": "Bus Guideway"},
"highway/construction": {"icon": "iD-highway-construction", "fields": ["name", "opening_date", "check_date", "note", "oneway", "structure", "access"], "geometry": ["line"], "tags": {"highway": "construction", "access": "no"}, "terms": ["closed", "closure", "construction"], "name": "Road Closed"},
"highway/corridor": {"icon": "iD-highway-footway", "fields": ["name", "width", "level", "access_simple"], "geometry": ["line"], "tags": {"highway": "corridor"}, "terms": ["gallery", "hall", "hallway", "indoor", "passage", "passageway"], "name": "Indoor Corridor"},
"highway/crossing/zebra-raised": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "zebra", "traffic_calming": "table"}, "reference": {"key": "traffic_calming", "value": "table"}, "terms": ["zebra crossing", "marked crossing", "crosswalk", "flat top", "hump", "speed", "slow"], "name": "Marked Crosswalk (Raised)", "searchable": false},
"highway/crossing/zebra": {"icon": "temaki-pedestrian", "fields": ["crossing", "kerb", "tactile_paving"], "geometry": ["vertex"], "tags": {"highway": "crossing", "crossing": "zebra"}, "reference": {"key": "highway", "value": "crossing"}, "terms": ["zebra crossing", "marked crossing", "crosswalk"], "name": "Marked Crosswalk", "searchable": false},
Expand Down
25 changes: 25 additions & 0 deletions data/presets/presets/highway/construction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"icon": "iD-highway-construction",
"fields": [
"name",
"opening_date",
"check_date",
"note",
"oneway",
"structure",
"access"
],
"geometry": [
"line"
],
"tags": {
"highway": "construction",
"access": "no"
},
"terms": [
"closed",
"closure",
"construction"
],
"name": "Road Closed"
}
10 changes: 9 additions & 1 deletion data/taginfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2707,6 +2707,13 @@
"object_types": ["way"],
"icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-bus-guideway.svg?sanitize=true"
},
{
"key": "access",
"value": "no",
"description": "🄿 Road Closed, 🄵 Allowed Access",
"object_types": ["way"],
"icon_url": "https://raw.githubusercontent.com/openstreetmap/iD/master/svg/iD-sprite/presets/highway-construction.svg?sanitize=true"
},
{
"key": "highway",
"value": "corridor",
Expand Down Expand Up @@ -6876,7 +6883,6 @@
},
{"key": "access", "description": "🄵 Allowed Access"},
{"key": "access", "value": "yes", "description": "🄵 Allowed Access"},
{"key": "access", "value": "no", "description": "🄵 Allowed Access"},
{
"key": "access",
"value": "permissive",
Expand Down Expand Up @@ -7065,6 +7071,7 @@
{"key": "capacity", "description": "🄵 Capacity"},
{"key": "cash_in", "description": "🄵 Cash In"},
{"key": "castle_type", "description": "🄵 Type"},
{"key": "check_date", "description": "🄵 Last Checked Date"},
{"key": "clothes", "description": "🄵 Clothes"},
{"key": "collection_times", "description": "🄵 Collection Times"},
{"key": "colour", "description": "🄵 Color"},
Expand Down Expand Up @@ -7506,6 +7513,7 @@
{"key": "oneway", "value": "no", "description": "🄵 One Way"},
{"key": "oneway", "value": "reversible", "description": "🄵 One Way"},
{"key": "oneway", "value": "alternating", "description": "🄵 One Way"},
{"key": "opening_date", "description": "🄵 Expected Opening Date"},
{"key": "opening_hours", "description": "🄵 Hours"},
{"key": "operator", "description": "🄵 Operator"},
{"key": "outdoor_seating", "description": "🄵 Outdoor Seating"},
Expand Down
10 changes: 10 additions & 0 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1755,6 +1755,9 @@
"castle_type": {
"label": "Type"
},
"check_date": {
"label": "Last Checked Date"
},
"clothes": {
"label": "Clothes"
},
Expand Down Expand Up @@ -2431,6 +2434,9 @@
"alternating": "Alternating"
}
},
"opening_date": {
"label": "Expected Opening Date"
},
"opening_hours": {
"label": "Hours"
},
Expand Down Expand Up @@ -4795,6 +4801,10 @@
"name": "Bus Guideway",
"terms": ""
},
"highway/construction": {
"name": "Road Closed",
"terms": "closed,closure,construction"
},
"highway/corridor": {
"name": "Indoor Corridor",
"terms": "gallery,hall,hallway,indoor,passage,passageway"
Expand Down
9 changes: 9 additions & 0 deletions svg/iD-sprite/presets/highway-construction.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 029f702

Please sign in to comment.