OpenHistoricalMap / issues

File your issues here, regardless of repo until we get all our repos squared away; we don't want to miss anything.
Creative Commons Zero v1.0 Universal
19 stars 1 forks source link

Make new timeslider demo to use MapLibre #788

Open danrademacher opened 6 months ago

danrademacher commented 6 months ago

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:

  1. Make a new demo of current Timeslider (v2) in a simple Maplibre map, drawing the map style live from https://github.com/OpenHistoricalMap/map-styles/blob/staging/ohm_timeslider_tegola/tegola-ohm.json
  2. this demo could live in https://github.com/OpenHistoricalMap/map-styles/ to make clear it is for demoing the map styles in that repo
  3. Bonus to allow selecting different styles (rails, woodblock, Japanese scroll)

cc @tsinn and @vknoppkewetzel does this capture what you need for testing?

vknoppkewetzel commented 6 months ago

That sounds great, especially useful if we can switch between styles in one URL!

danrademacher commented 4 months ago

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.

1ec5 commented 4 months ago

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.

danrademacher commented 4 months ago

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

1ec5 commented 4 months ago

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.

danrademacher commented 3 months ago

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

1ec5 commented 3 months ago

No need to refresh; it updates live based on the date in the URL. Otherwise this is accurate.