Add an error handler for overpass AJAX calls

This commit is contained in:
Tom Hughes 2014-03-17 00:24:29 +00:00
parent 1f250c45bd
commit d5fdc0855a
2 changed files with 9 additions and 0 deletions

View file

@ -198,6 +198,13 @@ OSM.Query = function(map) {
.text(I18n.t("javascripts.query.nothing_found"))
.appendTo($ul);
}
},
error: function(xhr, status, error) {
$section.find(".loader").stopTime("loading").hide();
$("<li>")
.text(I18n.t("javascripts.query." + status, { server: OSM.OVERPASS_URL, error: error }))
.appendTo($ul);
}
}));
}