mapbox/mapbox-gl-js
View on GitHubCache-defeating URL parameters aren't passed to sprite URLs
Open
#5,550 opened on Oct 30, 2017
bug :lady_beetle:good first issue
Description
mapbox-gl-js version: 0.41.0
Steps to Trigger Behavior
- Call mapboxgl.map({ ... style: 'mapbox://styles/user/abc123?update=1 } )
- The style file is fetched from: api.mapbox.com/styles/v1/user/abc123.json?update=1&access_token=...
Expected Behavior
- The sprite file is fetched from api.mapbox.com/styles/v1/user/abc123/sprite@2x.json?update=1&access_token=...
Actual Behavior
- The sprite file is fetched from api.mapbox.com/styles/v1/user/abc123/sprite@2x.json?access_token=...
This means that when you update icons through the Studio interface, it often takes a long time before you can see them in your maps, because the files get cached along the way, and there's really no workaround.