- does not prepend /v4/ to api endpoints like /fonts/v1/
- only prepends it to things starting with /fontstack
- solves the problem in #1918
- refs mapbox/mapbox-gl-style-spec#309
The existing conditional would always be false, since it
was comparing a url that begins with "mapbox://". In fact
no conditional is necessary; the secure TileJSON resource
should always be requested.
Based on mapbox.normalizeTileURL() in mapbox/mapbox-gl-js, but insert a “{ratio}” placeholder instead of “@2x” in order to keep the pixelRatio logic in TileData::request().
Fixes#919.