Repository navigation
Description
We had an issue over the weekend, #594, where changes to the map style there broke maps for Overpass Turbo, the OHM Wiki page, and our forthcoming new embed style.
This occurred because over time we slowly morphed form using the map-styles repo as purely a testing ground to being a source of live styles for clients other than the main OHM website.
We have short and long-term approaches to prevenitng this from happening in the future, while meeting needs of the cartography team for testing the style within a timeslider-enabled environment that also uses the same renderer as the website.
Short-term fix (going in place today)
- @tsinn to make a new copy of https://github.com/OpenHistoricalMap/map-styles/blob/staging/ohm_timeslider_tegola/tegola-ohm.json to be used exclusively for editing.
- @tsinn to also edit this demo, https://github.com/OpenHistoricalMap/mbgl-timeslider/blob/110120027c7d397b3b7dac5b6b2ba39971f9fcff/demo/index.js#L12, to point at that edit file. Tim and @vknoppkewetzel will use that file to make future carto changes and validate before replacing the contents of https://github.com/OpenHistoricalMap/map-styles/blob/staging/ohm_timeslider_tegola/tegola-ohm.json, which is directly consumed by various clients.
this will require no changes in endpoint consumers, but it's not a great long-term fix since it's still pretty manual, potentially error-prone, and a bit hard to explain and understand.
Longer-term fix
Generally, the stylesheet repo is a bit messy and not using branches and automated deployment in the ways we should. This is mostly because it has served primarily as a storage place for JSON files edited in Maputnik, rather than actual application code.
A more sustainable fix would be to:
- Create a new S3 deployment destination, under map-styles.openhistoricalmap.org, to which we deploy the style JSONs, sprites, fonts, and glyphs needed for each style. Likely in this directory structure:
fonts
glyphicons
japanese_scroll
ohm_default
woodblock
- Do an initial population of the S3 bucket, so the new endpoints work, and then ensure that all current consumers of the stylesheets from the
map-stylesrepo switch their endpoints to the new versions - Clean up the code on
map-stylesto clearly delineate what is editable, remove unused files, etc. - Add webpack automation to produce the above output in a
distdirectory in themap-stylesrepo, but git-ignore the output - Merge changes from
staginginto the neglectedmasterbranch of 'ma - Develop a Github Action similar to https://github.com/OpenHistoricalMap/ohm-deploy/blob/main/.github/workflows/frontend-overpass.yaml to automate deployment of new map styles as part of the same process by which we update the rest of the OHM ecosystem.
cc @1ec5 @Rub21 interested in your take on the longer term option described above to formalize how we deploy stylesheet updates for consumers other than ohm-website.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady for Staging
Activity
Draft style json to be used in timeslider demo
Pointing mbgl timeslider to draft style json
1ec5 commentedon Sep 6, 2023
Sounds good. The subdomain will hide the implementation detail of how the files are being hosted, which is nice. Maybe we could remove “Tegola” from the file name at the same time. Will the root of the subdomain be a simple file listing, similar to planet.openhistoricalmap.org, or a more elaborate readme? Either way, we should coordinate the deployment of this subdomain (and any renaming of the existing files) with updates to the documentation on the wiki.
Rub21 commentedon Dec 10, 2025
Seems this ticket was fixed with https://www.npmjs.com/package/@openhistoricalmap/map-styles/