[openstreetmap/openstreetmap-website] Migrate the dashboard entry page from leaflet to maplibre (PR #6504)
Minh Nguyễn
notifications at github.com
Tue Nov 18 09:11:53 UTC 2025
@1ec5 approved this pull request.
> $(function () {
const defaultHomeZoom = 12;
let map;
if ($("#map").length) {
- map = L.map("map", {
+ map = new maplibregl.Map({
+ container: "map",
+ style: {
+ version: 8,
+ name: "OSM Raster",
+ sources: {
+ osm: {
+ type: "raster",
+ tiles: [
+ "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
+ ],
+ tileSize: 256,
+ maxzoom: 19,
+ attribution: "© OpenStreetMap contributors"
Do we need to set this property if `attributionControl` is going to be `false` anyways?
> $(function () {
const defaultHomeZoom = 12;
let map;
if ($("#map").length) {
- map = L.map("map", {
+ map = new maplibregl.Map({
+ container: "map",
+ style: {
+ version: 8,
+ name: "OSM Raster",
This property is [optional](https://maplibre.org/maplibre-style-spec/root/#name). If anything surfaces it to the user somehow, we’d need to make it localizable, but I think it would be easier to omit it.
> +
+ &:hover, &:focus {
+ background-color: black !important;
+ }
+
+ &:first-child {
+ border-start-start-radius: 4px;
+ }
+
+ &:last-child {
+ border-end-start-radius: 4px;
+ }
+}
+
+.maplibregl-user-location-accuracy-circle {
+ background-color: $green !important;
This is a nice touch. It’s inconsistent with the accuracy circle’s appearance on the homepage, but I suspect most users won’t notice the inconsistency. (For that matter, I had forgotten we even had a geolocation control on this map.)
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6504#pullrequestreview-3476280514
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6504/review/3476280514 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251118/445d35c8/attachment-0001.htm>
More information about the rails-dev
mailing list