@hlfan commented on this pull request.
> + const user = $(this).data("user");
+ const { lat, lon } = user;
+
+ if (!lat || !lon) return null;
+
+ const marker = OSM.MapLibre.getMarker({
+ icon: "dot",
+ color: user.color
+ })
+ .setLngLat([lon, lat])
.setPopup(OSM.MapLibre.getPopup(user.description))
```suggestion
const { lat, lon, color, description } = $(this).data("user");
if (!lat || !lon) return null;
const marker = OSM.MapLibre
.getMarker({ icon: "dot", color })
.setLngLat([lon, lat])
.setPopup(OSM.MapLibre.getPopup(description))
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6654#pullrequestreview-3624000436
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6654/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev