Differentiate missing geometry errors by colour

This commit is contained in:
SilentSpike
2019-01-20 17:20:50 +00:00
parent bea6f4dcfd
commit 9600d67fc6
4 changed files with 24 additions and 10 deletions
+10 -1
View File
@@ -123,9 +123,18 @@
color: #EE7600;
}
.iOSM_error_type_mr { /* missing road */
.iOSM_error_type_mr_road { /* missing road */
color: #B0171F;
}
.iOSM_error_type_mr_path { /* missing path */
color: #A0522D;
}
.iOSM_error_type_mr_parking { /* missing parking */
color: #EEEE00;
}
.iOSM_error_type_mr_both { /* missing road+parking */
color: #FFA500;
}
.iOSM_error_type_tr { /* missing turn restriction */
color: #1E90FF;
+12 -7
View File
@@ -160,12 +160,15 @@ export default {
var d = new impOsmError({
loc: pointAverage(feature.points), // TODO: This isn't great for curved roads, would be better to find actual midpoint of segment
comments: null,
error_subtype: '',
error_type: k,
object_id: feature.wayId,
object_type: 'way',
road_type: feature.type
object_type: 'way'
});
//TODO include road type in description?
// feature.type
// Variables used in the description
d.replacements = {
percentage: feature.percentOfTrips,
@@ -181,16 +184,18 @@ export default {
// Tiles at high zoom == missing roads
if (data.tiles) {
data.tiles.forEach(function(feature) {
var geoType = feature.type.toLowerCase();
var d = new impOsmError({
loc: pointAverage(feature.points),
comments: null,
error_type: k,
geometry_type: feature.type
error_subtype: '_' + geoType,
error_type: k
});
d.replacements = {
num_trips: feature.numberOfTrips,
geometry_type: t('QA.improveOSM.geometry_types.' + feature.type.toLowerCase())
geometry_type: t('QA.improveOSM.geometry_types.' + geoType)
};
_erCache.data[d.id] = d;
@@ -212,10 +217,10 @@ export default {
var d = new impOsmError({
loc: [loc.lon, loc.lat],
comments: null,
error_subtype: '',
error_type: k,
object_id: via_node,
object_type: 'node',
turn_type: feature.turnType
object_type: 'node'
});
// Variables used in the description
+1 -1
View File
@@ -116,7 +116,7 @@ export function svgImproveOSM(projection, context, dispatch) {
var markersEnter = markers.enter()
.append('g')
.attr('class', function(d) {
return 'iOSM_error iOSM_error-' + d.id + ' iOSM_error_type_' + d.error_type; }
return 'iOSM_error iOSM_error-' + d.id + ' iOSM_error_type_' + d.error_type + d.error_subtype; }
);
markersEnter
+1 -1
View File
@@ -44,7 +44,7 @@ export function uiImproveOsmHeader() {
iconEnter
.append('div')
.attr('class', function(d) {
return 'preset-icon-28 iOSM_error iOSM_error-' + d.id + ' iOSM_error_type_' + d.error_type;
return 'preset-icon-28 iOSM_error iOSM_error-' + d.id + ' iOSM_error_type_' + d.error_type + d.error_subtype;
})
.call(svgIcon('#iD-icon-bolt', 'iOSM_error-fill'));