From: mmd-osm Date: Thu, 10 Aug 2017 18:49:50 +0000 (+0100) Subject: Discard empty ways from query result geometries X-Git-Tag: live~3888 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/7fd1e559383807dd0b509c7a08642f9d3a48616e Discard empty ways from query result geometries Fixes #1608 --- diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 018aedf98..7ac613d71 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -146,7 +146,7 @@ OSM.Query = function(map) { if (feature.type === "node" && feature.lat && feature.lon) { geometry = L.circleMarker([feature.lat, feature.lon], featureStyle); - } else if (feature.type === "way" && feature.geometry) { + } else if (feature.type === "way" && feature.geometry && feature.geometry.length > 0) { geometry = L.polyline(feature.geometry.filter(function (point) { return point !== null; }).map(function (point) {