[openstreetmap/openstreetmap-website] Make search show multiple markers (PR #6235)
Marwin Hochfelsner
notifications at github.com
Sun Jul 27 10:36:35 UTC 2025
@hlfan commented on this pull request.
> }
function showSearchResult() {
- let marker = $(this).data("marker");
-
- if (!marker) {
- const data = $(this).find("a.set_position").data();
-
- marker = L.marker([data.lat, data.lon], { icon: OSM.getMarker({}) });
-
- $(this).data("marker", marker);
- }
-
+ const index = processedResults++;
+ const listItem = $(this);
+ const color = `hwb(${(index * (Math.sqrt(5) - 1) * 180) % 360}deg 5% 5%)`;
I found that the first colors, when rotating the other way, line up more with the other marker colors:
|+angle|-angle|
|-|-|
|`#0df250`|`#0d50f2`|
|`#930df2`|`#93f20d`|
Yeah, pulling out that variable is a good idea.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6235#discussion_r2233905196
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6235/review/3059458906 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250727/44e7091b/attachment.htm>
More information about the rails-dev
mailing list