@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/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev