Open 1ec5 opened 1 year ago
Ideally, the TileJSON file v3.json would have a metadata field with this timestamp in it, and then we could grab it out of the vector source.
The TileJSON now contains timestamp metadata as of onthegomap/planetiler#428. However, GL JS is still discarding this data.
The vector tiles aren’t being generated on a short, regular interval yet, so the user doesn’t have a good sense for how old the visible data is. We should display a timestamp of when the tiles were last generated, or perhaps the timestamps of the OSM planet file and Wikidata dump that were used to generate the tiles.
Ideally, the TileJSON file v3.json would have a
metadata
field with this timestamp in it, and then we could grab it out of the vector source. However, GL JS doesn’t preserve TileJSON metadata: mapbox/mapbox-gl-js#5471 → maplibre/maplibre-gl-js#2965. As a workaround, the attribution string could be modified to include the timestamp, which GL JS would show automatically. Alternatively, the process for generating the tiles could spit out a separate JSON file alongside v3.json that this project could fetch manually.