Improve URL error messages 411, 412, 413

This commit is contained in:
Bryan Housel
2019-01-10 21:35:13 -05:00
parent 7f321abbaf
commit ae8dffa43c
4 changed files with 28 additions and 12 deletions
+13
View File
@@ -135,6 +135,10 @@ function parseError(capture, idType) {
capture = linkErrorObject(capture);
break;
case 'url':
capture = linkURL(capture);
break;
// link an entity ID
case 'n':
case 'w':
@@ -171,6 +175,10 @@ function parseError(capture, idType) {
return '<a class="kr_error_entity_link">' + d + '</a>';
}
function linkURL(d) {
return '<a class="kr_external_link" target="_blank" href="' + d + '">' + d + '</a>';
}
// arbitrary node list of form: #ID, #ID, #ID...
function parse211(capture) {
var newList = [];
@@ -341,6 +349,11 @@ export default {
case '300':
props.description = 'This highway is missing a maxspeed tag';
break;
case '411':
case '412':
case '413':
props.description = 'This feature~' + props.description;
break;
}
// - move markers slightly so it doesn't obscure the geometry,