[openstreetmap/openstreetmap-website] Get directions using fetch (PR #5642)
Holger Jeromin
notifications at github.com
Tue Feb 11 07:25:19 UTC 2025
@HolgerJeromin commented on this pull request.
> @@ -212,6 +202,13 @@ OSM.Directions = function (map) {
map.setSidebarOverlaid(true);
// TODO: collapse width of sidebar back to previous
});
+ }).catch(function () {
+ map.removeLayer(polyline);
+ if (reportErrors) {
+ $("#sidebar_content").html("<div class=\"alert alert-danger\">" + I18n.t("javascripts.directions.errors.no_route") + "</div>");
+ }
+ }).finally(function () {
+ awaitingRoute = false;
Add `controller = undefined;` here.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#pullrequestreview-2607888814
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5642/review/2607888814 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250210/f7bcad44/attachment.htm>
More information about the rails-dev
mailing list