weight: 4,
opacity: 1,
fillOpacity: 0.5,
- clickable: false
+ interactive: false
};
queryButton.on("click", function (e) {
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) {
url: url,
method: "POST",
data: {
- data: "[timeout:5][out:json];" + query,
+ data: "[timeout:10][out:json];" + query,
},
success: function(results) {
var elements;
if (merge) {
elements = results.elements.reduce(function (hash, element) {
var key = element.type + element.id;
+ if ("geometry" in element) {
+ delete element.bounds;
+ }
hash[key] = $.extend({}, hash[key], element);
return hash;
}, {});
}
}
+ if (results.remark) {
+ $("<li>")
+ .text(I18n.t("javascripts.query.error", { server: url, error: results.remark }))
+ .appendTo($ul);
+ }
+
if ($ul.find("li").length === 0) {
$("<li>")
.text(I18n.t("javascripts.query.nothing_found"))