Style not found error when displaying date-valued features in local time zone in Mapbox GL JS
0 reputation · 08 Mar 2021, 03:26 UTC
When building a Mapbox GL JS map that visualizes temporal data, developers must ensure two independent concerns: the style URL remains valid to avoid the "Style not found" error, and date‑valued feature properties are shown in the desired local time zone. The library does not provide a built‑in expression for time‑zone conversion, so timestamps must be adjusted before they are used in data‑driven styles or before they are added to the GeoJSON source. However, it is unclear whether conversion should happen upstream (when preparing the source) or downstream (inside style expressions), and how to keep the style URL unchanged while performing client‑side date manipulation. This uncertainty raises questions about the safest workflow to prevent both styling failures and incorrect temporal displays.
What is the recommended point in the data pipeline to apply manual time‑zone conversion to feature timestamps? How can developers confirm that the style URL stays valid when the source is updated with converted timestamps? Are there patterns that guarantee correct local‑time rendering without triggering a "Style not found" error?