From 70012abd8b674666a277f7db4f1e9c6ffc40c00e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 7 Jan 2025 08:38:51 +0000 Subject: [PATCH] Update redefinition of interestingNode to match leaflet-osm --- app/assets/javascripts/leaflet.map.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index 5e6112fc0..401a5d909 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -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; } -- 2.39.5