Update redefinition of interestingNode to match leaflet-osm
This commit is contained in:
parent
f946797520
commit
70012abd8b
1 changed files with 2 additions and 4 deletions
|
@ -312,13 +312,11 @@ L.OSM.Map = L.Map.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
map._objectLayer.interestingNode = function (node, ways, relations) {
|
map._objectLayer.interestingNode = function (node, wayNodes, relationNodes) {
|
||||||
if (object.type === "node") {
|
if (object.type === "node") {
|
||||||
return true;
|
return true;
|
||||||
} else if (object.type === "relation") {
|
} else if (object.type === "relation") {
|
||||||
for (var i = 0; i < relations.length; i++) {
|
if (relationNodes[node.id]) return true;
|
||||||
if (relations[i].members.indexOf(node) !== -1) return true;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue