]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/query.js
Remove dependencies on mapzen services
[rails.git] / app / assets / javascripts / index / query.js
index 018aedf98a01df4c5bc3a4996611b9596edbd386..7ac613d71ec1737e2d80088ad5f3c0e29d177868 100644 (file)
@@ -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) {