Open danrademacher opened 6 months ago
That sounds great, especially useful if we can switch between styles in one URL!
an easy solution here would be to use a fork of the embed repo and use that for the demo foundation. Either a fork or a parameter to switch endpoints.
OpenHistoricalMap/ohm-embed-1yr#6 allows you to switch between production and staging stylesheets using a URL parameter. OpenHistoricalMap/ohm-embed-1yr#5 gets pretty close to the functionality of mbgl-timeslider in the old demo site, by making it possible to adjust the year in a URL parameter without having to reload the page, and also by optionally animating the time based on some URL parameters. There’s still no UI though; it’s unclear to me if a time slider UI would be in scope for that repository.
Not sure the best way for @vknoppkewetzel or @tsinn to review the PRs mentioned above, since they're not in the biz of running code locally or reviewing code directly.
Are these breaking changes for the existing embed? If not, could we merge and deploy and then have Vanessa try on the live embed link?
Alternatively, we could deploy to another location like an S3 bucket for testing to confirm these meet need for testing map style changes
Both PRs should be backwards-compatible. OpenHistoricalMap/ohm-embed-1yr#6 is the same complexity as stuff I’ve committed directly to main in the past, though I’d like to stop doing that if possible. Apparently that repository deploys directly to the embed site as soon as it goes to main, so we can roll back pretty easily if necessary.
this is now ready to test for use in styling workflow.
Here's an example: https://embed.openhistoricalmap.org/#map=16/40.70486/-74.01313&date=1700&layer=O_staging
Same are in Rail style: https://embed.openhistoricalmap.org/#map=16/40.70486/-74.01313&date=1700&layer=R_staging
Woodblock: https://embed.openhistoricalmap.org/#map=16/40.70486/-74.01313&date=1700&layer=W_staging
Japanese scroll: https://embed.openhistoricalmap.org/#map=16/40.70486/-74.01313&date=1700&layer=J_staging
Testing across time would involve changing the year manually in the URL and refreshing, since there's no timeslider UI
No need to refresh; it updates live based on the date in the URL. Otherwise this is accurate.
Currently, we use this old demo to rapidly test the map style with time filtering outside of a whole Rails stack: https://openhistoricalmap.github.io/mbgl-timeslider/demo/#13.000/51.50660/-0.08240/1850,-4000-2023
That is using old MBGL. So not a perfect match for the live website which now uses MapLibre.
That demo also uses an old version oft he timeslider.
We also have this demo of the newer timeslider in Leaflet shimmed with old GL: https://openhistoricalmap.github.io/leaflet-ohm-timeslider-v2/
Ideally, we would do the following:
cc @tsinn and @vknoppkewetzel does this capture what you need for testing?