diff --git a/css/65_data.css b/css/65_data.css index 5aebce603..2ecad6116 100644 --- a/css/65_data.css +++ b/css/65_data.css @@ -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; diff --git a/modules/services/improveOSM.js b/modules/services/improveOSM.js index 34c997f2e..e36734ff3 100644 --- a/modules/services/improveOSM.js +++ b/modules/services/improveOSM.js @@ -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 diff --git a/modules/svg/improveOSM.js b/modules/svg/improveOSM.js index 6255bcba3..d701a8706 100644 --- a/modules/svg/improveOSM.js +++ b/modules/svg/improveOSM.js @@ -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 diff --git a/modules/ui/improveOSM_header.js b/modules/ui/improveOSM_header.js index 070c230be..102f5a57a 100644 --- a/modules/ui/improveOSM_header.js +++ b/modules/ui/improveOSM_header.js @@ -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'));