Handle turn restriction errors

This commit is contained in:
SilentSpike
2019-01-20 13:31:13 +00:00
parent 4f2646d567
commit 23a4d71410
4 changed files with 24 additions and 30 deletions
+20 -26
View File
@@ -124,7 +124,7 @@ export default {
_forEach(_impOsmUrls, function(v, k) {
var url = v + '/search?' + utilQsString(params);
if (k == 'mr' || k == 'tr') return
if (k == 'mr') return
requests[k] = d3_json(url,
function(err, data) {
@@ -148,11 +148,9 @@ export default {
var d = new impOsmError({
loc: [loc.lon, loc.lat],
comment: null,
description: '',
error_type: feature.type,
parent_error_type: k,
title: 'Missing One-way'
comments: null,
error_type: k,
road_type: feature.type
});
_erCache.data[d.id] = d;
@@ -170,10 +168,8 @@ export default {
// var d = new impOsmError({
// loc: [feature.x, feature.y],
// comment: null,
// description: desc || '',
// error_type: feature.type,
// parent_error_type: k,
// title: 'Missing Roads'
// error_type: k,
// geometry_type: feature.type
// });
// _erCache.data[d.id] = d;
@@ -181,24 +177,22 @@ export default {
// })
// }
// Entities at high zoom == turn restrictions
if (data.entities) {
data.entities.forEach(function(feature) {
var loc = feature.point;
// if (data.entities) {
// data.entities.forEach(function(feature) {
// var loc = feature.point;
var d = new impOsmError({
loc: [loc.lon, loc.lat],
comments: null,
error_type: k,
turn_type: feature.turnType
});
// var d = new impOsmError({
// loc: [loc.lat, loc.lon],
// comment: null,
// description: desc || '',
// error_type: feature.turnType,
// parent_error_type: k,
// title: 'Missing Turn Restriction'
// });
// _erCache.data[d.id] = d;
// _erCache.rtree.insert(encodeErrorRtree(d));
// })
// }
_erCache.data[d.id] = d;
_erCache.rtree.insert(encodeErrorRtree(d));
})
}
}
);
});
+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.parent_error_type; }
return 'iOSM_error iOSM_error-' + d.id + ' iOSM_error_type_' + d.error_type; }
);
markersEnter
+1 -1
View File
@@ -17,7 +17,7 @@ export function uiImproveOsmDetails(context) {
var unknown = t('inspector.unknown');
if (!d) return unknown;
var errorType = d.parent_error_type;
var errorType = d.error_type;
var et = dataEn.QA.improveOSM.error_types[errorType];
var detail;
+2 -2
View File
@@ -11,7 +11,7 @@ export function uiImproveOsmHeader() {
var unknown = t('inspector.unknown');
if (!d) return unknown;
var errorType = d.parent_error_type;
var errorType = d.error_type;
var et = dataEn.QA.improveOSM.error_types[errorType];
if (et && et.title) {
@@ -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.parent_error_type;
return 'preset-icon-28 iOSM_error iOSM_error-' + d.id + ' iOSM_error_type_' + d.error_type;
})
.call(svgIcon('#iD-icon-bolt', 'iOSM_error-fill'));