[openstreetmap/openstreetmap-website] Take entrances into account for routing start and end points (PR #7017)
Minh Nguyễn
notifications at github.com
Fri Apr 24 10:06:36 UTC 2026
@1ec5 commented on this pull request.
> +
+ let bestFind = types.length;
+ let result = null;
+
+ for (const e of entrances) {
+ const matchId = types.indexOf(e.type);
+ if (matchId === 0) return e;
+ if (matchId > 0 && matchId < bestFind) {
+ bestFind = matchId;
+ result = e;
+ }
+ }
+
+ return result;
Seems like there’s agreement that we don’t have a perceptible performance issue on our hands. If we need to add support for more entrance types, we can do that in a separate PR, right?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7017#discussion_r3136954712
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/7017/review/4169629681 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260424/b01f7160/attachment-0001.htm>
More information about the rails-dev
mailing list