Skip to content

Commit

Permalink
Update redefinition of interestingNode to match leaflet-osm
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jan 7, 2025
1 parent f946797 commit 70012ab
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/assets/javascripts/leaflet.map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
return true;
} else if (object.type === "relation") {
for (var i = 0; i < relations.length; i++) {
if (relations[i].members.indexOf(node) !== -1) return true;
}
if (relationNodes[node.id]) return true;
} else {
return false;
}
Expand Down

0 comments on commit 70012ab

Please sign in to comment.