Repository navigation
Closed
Labels
Description
OpenHistoricalMap/map-styles@2a07967 added a redundant roads_pedestrian_street line layer to the Historic style that triggers the following error on any MapLibre GL map:
Error: layers[128]: duplicate layer id "roads_pedestrian_street", previously used at line undefined
kn https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:31
Yt https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:35
_load https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:35
_request https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:35
N https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:31
promise callback*N/</< https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:31
N https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:31
promise callback*N/< https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:31
N https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:31
Z https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:31
getJSON https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:31
loadURL https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:35
_updateStyle https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:35
setStyle https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:35
Map https://unpkg.com/maplibre-gl@^2.4/dist/maplibre-gl.js:35
<anonymous> https://openhistoricalmap.github.io/ohm-embed-1yr/embed-map-single-year.js:17
EventListener.handleEvent* https://openhistoricalmap.github.io/ohm-embed-1yr/embed-map-single-year.js:11
maplibre-gl.js:31:12106
It looks like the intention was to move the layer rather than duplicating it, so the old layer needs to be removed to avoid this conflict. As it is, the stylesheet is invalid.
This regression currently affects Overpass turbo, the OHM embed, and the OSM Wiki. It does not affect the main openhistoricalmap.org slippy map for some reason, maybe because the leaflet-mapbox-gl plugin is more lenient.
/cc @vknoppkewetzel

Activity
danrademacher commentedon Sep 4, 2023
This doesn't affect the main website because there's an air gap to that site where we copy the style into to main repo and make some changes to it to allow for dynamic swapping between staging and prod endpoints.
For these other services, we should change them all to load from https://github.com/OpenHistoricalMap/map-styles/blob/staging/ohm_timeslider_tegola/tegola-ohm-production.json
This is the file where we do full testing before we deploy to the website
danrademacher commentedon Sep 4, 2023
Actually, I'm wrong about this solution. Back in this ticket, #341 (comment), we had to move away from using the production version, which is specifically optimized for inclusion in the website, where the complete style is built via Javascript, meaning the production version is not a full and valid style file.
I know Vanessa was testing changes in Maputnik to even make style updates, so it seems like this could be an issue where Maputnik doesn't care about duplicates but other renderers fail
danrademacher commentedon Sep 4, 2023
Fixed in OpenHistoricalMap/map-styles@5744353
vknoppkewetzel commentedon Sep 5, 2023
Hello thank you! Yes my intention was to delete the "old" pedestrian road layer and I missed it. Still getting used to making adjustments in Maputnik. thanks for flagging and fixing here
1ec5 commentedon Sep 5, 2023
Thanks, this is working again.
Interesting, I didn’t realize that. I was quite puzzled that a stylesheet request never showed up in the Network tab of the browser’s console.