Skip to content

Commit

Permalink
Discard empty ways from query result geometries
Browse files Browse the repository at this point in the history
Fixes #1608
  • Loading branch information
mmd-osm authored and tomhughes committed Aug 10, 2017
1 parent ff7244d commit 7fd1e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/index/query.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 7fd1e55

Please sign in to comment.