mapbox/mapbox-gl-js

Cache-defeating URL parameters aren't passed to sprite URLs

Open

#5,550 opened on Oct 30, 2017

View on GitHub
 (0 comments) (5 reactions) (0 assignees)JavaScript (10,532 stars) (2,203 forks)batch import
bug :lady_beetle:good first issue

Description

mapbox-gl-js version: 0.41.0

Steps to Trigger Behavior

  1. Call mapboxgl.map({ ... style: 'mapbox://styles/user/abc123?update=1 } )
  2. The style file is fetched from: api.mapbox.com/styles/v1/user/abc123.json?update=1&access_token=...

Expected Behavior

  1. The sprite file is fetched from api.mapbox.com/styles/v1/user/abc123/sprite@2x.json?update=1&access_token=...

Actual Behavior

  1. 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.

Contributor guide

Cache-defeating URL parameters aren't passed to sprite URLs · mapbox/mapbox-gl-js#5550 | Good First Issue