[openstreetmap/openstreetmap-website] Migrate the user diary to be maplibre based (PR #6676)

Frank Elsinga notifications at github.com
Sun Jan 4 23:54:54 UTC 2026


@CommanderStorm commented on this pull request.



>      if ($("#latitude").val() && $("#longitude").val()) {
-      marker = L.marker(centre, { icon: OSM.getMarker({}) }).addTo(map)
-        .bindPopup(OSM.i18n.t("diary_entries.edit.marker_text"));
+      const lngLat = new maplibregl.LngLat($("#longitude").val(), $("#latitude").val());
+      setLocation({ lngLat });
+      map.setCenter(lngLat);

Previous behaviour, but I think this is a bug.

```suggestion
```

> +    const navigationControl = new maplibregl.NavigationControl({ showCompass: false });
+    map.addControl(navigationControl, position);

if you want the GPS component on this page too

```suggestion
    const navigationControl = new maplibregl.NavigationControl({ showCompass: false });
    const geolocateControl = new maplibregl.GeolocateControl({
      positionOptions: {
        enableHighAccuracy: true
      },
      trackUserLocation: true
    });
    map.addControl(new OSM.MapLibre.CombinedControlGroup([navigationControl, geolocateControl]), position);
```

> @@ -1,18 +1,27 @@
+//= require maplibre.map
+//= require maplibre.i18n

if you want the GPS component on this page too

```suggestion
//= require maplibre.i18n
//= require maplibre.combinedcontrolgroup
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6676#pullrequestreview-3625233428
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6676/review/3625233428 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260104/56eda6ae/attachment.htm>


More information about the rails-dev mailing list