mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-18 14:45:12 +02:00
Add unsearchable preset for demolished:building=yes (close #7098)
Render features with a status prefix in the provisional styles (e.g. dashed outline)
This commit is contained in:
@@ -4562,6 +4562,9 @@ en:
|
||||
name: Advanced Stop Line
|
||||
# 'terms: advanced stop box,asl,bicycle box,bike box,bikebox,cycle box,cycle stop marking'
|
||||
terms: '<translate with synonyms or related terms for ''Advanced Stop Line'', separated by commas>'
|
||||
demolished/building:
|
||||
# 'demolished:building=*'
|
||||
name: Recently Demolished Building
|
||||
embankment:
|
||||
# embankment=yes
|
||||
name: Embankment
|
||||
|
||||
@@ -434,6 +434,7 @@
|
||||
"craft/window_construction": {"icon": "temaki-window", "geometry": ["point", "area"], "terms": ["glass"], "tags": {"craft": "window_construction"}, "name": "Window Construction"},
|
||||
"craft/winery": {"icon": "maki-alcohol-shop", "moreFields": ["{craft}", "min_age"], "geometry": ["point", "area"], "tags": {"craft": "winery"}, "name": "Winery"},
|
||||
"cycleway/asl": {"icon": "maki-bicycle", "fields": ["ref", "direction_vertex", "width"], "geometry": ["vertex"], "tags": {"cycleway": "asl"}, "terms": ["advanced stop box", "asl", "bicycle box", "bike box", "bikebox", "cycle box", "cycle stop marking"], "name": "Advanced Stop Line"},
|
||||
"demolished/building": {"fields": ["name", "address"], "geometry": ["area"], "tags": {"demolished:building": "*"}, "name": "Recently Demolished Building", "searchable": false},
|
||||
"emergency/designated": {"fields": ["emergency_combo"], "geometry": ["line"], "tags": {"emergency": "designated"}, "name": "Emergency Access Designated", "searchable": false, "matchScore": 0.01},
|
||||
"emergency/destination": {"fields": ["emergency_combo"], "geometry": ["line"], "tags": {"emergency": "destination"}, "name": "Emergency Access Destination", "searchable": false, "matchScore": 0.01},
|
||||
"emergency/no": {"fields": ["emergency_combo"], "geometry": ["line"], "tags": {"emergency": "no"}, "name": "Emergency Access No", "searchable": false, "matchScore": 0.01},
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"fields": [
|
||||
"name",
|
||||
"address"
|
||||
],
|
||||
"geometry": [
|
||||
"area"
|
||||
],
|
||||
"tags": {
|
||||
"demolished:building": "*"
|
||||
},
|
||||
"name": "Recently Demolished Building",
|
||||
"searchable": false
|
||||
}
|
||||
@@ -429,6 +429,7 @@
|
||||
{"key": "craft", "value": "window_construction", "description": "🄿 Window Construction", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/ideditor/temaki/icons/window.svg"},
|
||||
{"key": "craft", "value": "winery", "description": "🄿 Winery", "object_types": ["node", "area"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/alcohol-shop-15.svg"},
|
||||
{"key": "cycleway", "value": "asl", "description": "🄿 Advanced Stop Line", "object_types": ["node"], "icon_url": "https://cdn.jsdelivr.net/gh/mapbox/maki/icons/bicycle-15.svg"},
|
||||
{"key": "demolished:building", "description": "🄿 Recently Demolished Building (unsearchable)", "object_types": ["area"]},
|
||||
{"key": "emergency", "value": "designated", "description": "🄿 Emergency Access Designated (unsearchable)", "object_types": ["way"]},
|
||||
{"key": "emergency", "value": "destination", "description": "🄿 Emergency Access Destination (unsearchable)", "object_types": ["way"]},
|
||||
{"key": "emergency", "value": "no", "description": "🄿 Emergency Access No (unsearchable)", "object_types": ["way"]},
|
||||
|
||||
Vendored
+3
@@ -6453,6 +6453,9 @@
|
||||
"name": "Advanced Stop Line",
|
||||
"terms": "advanced stop box,asl,bicycle box,bike box,bikebox,cycle box,cycle stop marking"
|
||||
},
|
||||
"demolished/building": {
|
||||
"name": "Recently Demolished Building"
|
||||
},
|
||||
"emergency/designated": {
|
||||
"name": "Emergency Access Designated"
|
||||
},
|
||||
|
||||
@@ -43,7 +43,7 @@ export function svgTagClasses() {
|
||||
|
||||
tagClasses.getClassesString = function(t, value, entity) {
|
||||
var primary, status;
|
||||
var i, k, v;
|
||||
var i, j, k, v;
|
||||
|
||||
// in some situations we want to render perimeter strokes a certain way
|
||||
var overrideGeometry;
|
||||
@@ -88,6 +88,19 @@ export function svgTagClasses() {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!primary) {
|
||||
for (i = 0; i < statuses.length; i++) {
|
||||
for (j = 0; j < primaries.length; j++) {
|
||||
k = statuses[i] + ':' + primaries[j]; // e.g. `demolished:building=yes`
|
||||
v = t[k];
|
||||
if (!v || v === 'no') continue;
|
||||
|
||||
status = statuses[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add at most one status tag, only if relates to primary tag..
|
||||
if (!status) {
|
||||
for (i = 0; i < statuses.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user