You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it takes some practice and imagination -- and cycling through a locally running timeslider demo to actually see what an end user of the map would see at any particular moment. That means saving out the JSON and referencing the file in that other demo
We're not sure what options are available for this, but things we discussed:
Having one or more sets of prefiltered tilesets to use for styling (eg 1700, 1800, 1900). This seems feasible but a bit inefficient and inflexible, since any target item for styling might be in any year
Modifying Maputnik to somehow allow tile filtering or inserting the timeslider.
One more I just thought of -- if we could find where Maputnik stores the JSON style object for its own rendering (maybe in local storage somewhere?), I wonder if we could have a variant of the timeslider demo that easy to run locally and references the live style as it is edited in Maputnik. Still would mean two windows and a lot of refreshing, but faster than a full save/reload cycle. Even cooler would be if the timselider demo could lsiten for changes in Maputnik's local file and hit reload...
cc @1ec5 Here's the ticket with some ideas for making local styling easier with time filtering. I'm curious what you think about that last idea -- a variant of a simple JS demo that references the JSON one is editing in Maputnik
Modifying Maputnik to somehow allow tile filtering or inserting the timeslider.
Maputnik is a local Web application, so it should be pretty straightforward to fork it and host the fork on GitHub Pages. Assuming that’s the case, I wonder if leaflet-ohm-timeslider-v2 is in a state where it would be possible to integrate it into that fork of Maputnik. Then we don’t even have to juggle tabs.
Maputnik is a React application, which makes things slightly more complicated, but for example here’s where it installs Mapbox GL plugins and where it refreshes the style (so we’d want to reapply the time slider’s filters afterwards).
As a first step, the time slider library would need to be packaged up as an NPM library. This would also facilitate integration with Overpass turbo and other embedded maps (#485).
Interesting. We have occasionally published NPM packages, so I think that part is readily feasible. It would be really nice if we could modify a Maputnik fork in a way that was easily maintained and kept in sync with upstream. Maybe that's a case where React's modularity would work in our favor. Then agian, it doesn't look like Maputnik's code base is changing all that rapidly.
As a first step, the time slider library would need to be packaged up as an NPM library.
maplibre-gl-dates is the new NPM library for filtering the map by a date, but it includes no UI. We’d need to start a separate NPM library for the slider UI (which might be a good opportunity to redesign it for compactness).
Activity
danrademacher commentedon Apr 25, 2023
cc @1ec5 Here's the ticket with some ideas for making local styling easier with time filtering. I'm curious what you think about that last idea -- a variant of a simple JS demo that references the JSON one is editing in Maputnik
1ec5 commentedon Apr 25, 2023
Maputnik is a local Web application, so it should be pretty straightforward to fork it and host the fork on GitHub Pages. Assuming that’s the case, I wonder if leaflet-ohm-timeslider-v2 is in a state where it would be possible to integrate it into that fork of Maputnik. Then we don’t even have to juggle tabs.
Maputnik is a React application, which makes things slightly more complicated, but for example here’s where it installs Mapbox GL plugins and where it refreshes the style (so we’d want to reapply the time slider’s filters afterwards).
As a first step, the time slider library would need to be packaged up as an NPM library. This would also facilitate integration with Overpass turbo and other embedded maps (#485).
danrademacher commentedon Apr 25, 2023
Interesting. We have occasionally published NPM packages, so I think that part is readily feasible. It would be really nice if we could modify a Maputnik fork in a way that was easily maintained and kept in sync with upstream. Maybe that's a case where React's modularity would work in our favor. Then agian, it doesn't look like Maputnik's code base is changing all that rapidly.
1ec5 commentedon Aug 10, 2024
maplibre-gl-dates is the new NPM library for filtering the map by a date, but it includes no UI. We’d need to start a separate NPM library for the slider UI (which might be a good opportunity to redesign it for compactness).
1ec5 commentedon Feb 8, 2025
#914 tracks building a reusable time slider UI.