However, I don't see any way to pass this to mapbox-gl or maplibre-gl.
I tried manually fetching the same style URL that I see being fetched from the console and appending ?fresh=true, but it looked like that was not picket up by the map. Maybe because I change the URL when adding the flag?
Proposal
Ideally, I would be able to call <Map mapStyle="" fresh={true} /> (with true being evaluated by some condition (like a debug flag) internally).
Target Use Case
When using a Mapbox Style URL like
mapStyle="mapbox://styles/foo/123"
the results are cached.I am looking for a way to force a fresh version of the styles.
The Mapbox Style API has the (undocumented)
fresh=true
param for this use case (see https://github.com/mapbox/mapbox-sdk-js/issues/364#issuecomment-617894314).However, I don't see any way to pass this to mapbox-gl or maplibre-gl.
I tried manually fetching the same style URL that I see being fetched from the console and appending
?fresh=true
, but it looked like that was not picket up by the map. Maybe because I change the URL when adding the flag?Proposal
Ideally, I would be able to call
<Map mapStyle="" fresh={true} />
(with true being evaluated by some condition (like a debug flag) internally).