allow the optional to force adding the key parameter to the sprite url
This commit is contained in:
parent
e84503c9ac
commit
2e44de5bd2
2 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,8 @@ module.exports = function (options, repo, params, id, reportTiles, reportFont) {
|
|||
});
|
||||
// mapbox-gl-js viewer cannot handle sprite urls with query
|
||||
if (styleJSON_.sprite) {
|
||||
styleJSON_.sprite = fixUrl(styleJSON_.sprite, true, true);
|
||||
var forceKeyParameter = options.auth.forceSpriteKey === true;
|
||||
styleJSON_.sprite = fixUrl(styleJSON_.sprite, !forceKeyParameter, true);
|
||||
}
|
||||
if (styleJSON_.glyphs) {
|
||||
styleJSON_.glyphs = fixUrl(styleJSON_.glyphs, false, true);
|
||||
|
|
|
@ -70,6 +70,7 @@ function start(opts) {
|
|||
options.auth = options.auth || {};
|
||||
options.auth.keyName = options.auth.keyName || 'key';
|
||||
options.auth.keyDomains = options.auth.keyDomains || [];
|
||||
options.auth.forceSpriteKey = options.auth.forceSpriteKey || false;
|
||||
|
||||
console.log("options:", options);
|
||||
|
||||
|
|
Loading…
Reference in a new issue