]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/query.js
Merge remote-tracking branch 'upstream/pull/1614'
[rails.git] / app / assets / javascripts / index / query.js
index 023e2a7f22069bba02babd5542246f0e711f0228..7ac613d71ec1737e2d80088ad5f3c0e29d177868 100644 (file)
@@ -12,7 +12,7 @@ OSM.Query = function(map) {
     weight: 4,
     opacity: 1,
     fillOpacity: 0.5,
     weight: 4,
     opacity: 1,
     fillOpacity: 0.5,
-    clickable: false
+    interactive: false
   };
 
   queryButton.on("click", function (e) {
   };
 
   queryButton.on("click", function (e) {
@@ -146,7 +146,7 @@ OSM.Query = function(map) {
 
     if (feature.type === "node" && feature.lat && feature.lon) {
       geometry = L.circleMarker([feature.lat, feature.lon], featureStyle);
 
     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) {
       geometry = L.polyline(feature.geometry.filter(function (point) {
         return point !== null;
       }).map(function (point) {