Only show connected vertex if it connects an interesting line

This commit is contained in:
Bryan Housel
2017-04-26 00:34:48 -04:00
parent 49c087d51f
commit 795fe29cdd

View File

@@ -59,8 +59,13 @@ _.extend(osmNode.prototype, {
return resolver.transient(this, 'isConnected', function() {
var parents = resolver.parentWays(this);
// vertex is connected to multiple parent ways
if (parents.length > 1) {
function isLine(entity) {
return entity.geometry(resolver) === 'line' &&
entity.hasInterestingTags();
}
// vertex is connected to multiple parent lines
if (parents.length > 1 && _.some(parents, isLine)) {
return true;
} else if (parents.length === 1) {