[openstreetmap/openstreetmap-website] Take entrances into account for routing start and end points (PR #7017)
Pablo Brasero
notifications at github.com
Thu Apr 23 08:56:41 UTC 2026
@pablobm 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;
I prefer mine... but of course I would say that :-P
I'm ok with either of these two (@lonvia's latest and @hlfan's). I realise I've started a bikeshedding discussion, so I'll stop here unless explicitly summoned. Let's get this merged.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7017?email_source=notifications&email_token=AAK2OLPDHABYQTM7RZPGIAT4XHLETA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMJWGEYDINZWGE3KM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS6XA4S7OJSXM2LFO5PW433UNFTGSY3BORUW63TTL5RWY2LDNM#discussion_r3129569541
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/7017/review/4161047616 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260423/03c8eb8a/attachment.htm>
More information about the rails-dev
mailing list