Adding special case for non-fontstack "glyph" resource URLs
- 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
This commit is contained in:
@@ -45,7 +45,11 @@ std::string normalizeGlyphsURL(const std::string& url, const std::string& access
|
||||
if (url.compare(0, mapbox.length(), mapbox) != 0)
|
||||
return url;
|
||||
|
||||
return normalizeURL(url, "/v4/", accessToken);
|
||||
const std::string fontstack = "mapbox://fontstack/";
|
||||
if (url.compare(0, fontstack.length(), fontstack) == 0)
|
||||
return normalizeURL(url, "/v4/", accessToken);
|
||||
|
||||
return normalizeURL(url, "/", accessToken);
|
||||
}
|
||||
|
||||
std::string normalizeTileURL(const std::string& url, const std::string& sourceURL, SourceType sourceType) {
|
||||
|
||||
Reference in New Issue
Block a user