Skip to content

Commit

Permalink
Modify sprite can't be written in relative path("sprite": "css/sprite…
Browse files Browse the repository at this point in the history
…") (#884).
  • Loading branch information
zjp8369 committed May 22, 2022
1 parent 128e82b commit 51684e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/util/mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ export class RequestManager {
}

normalizeSpriteURL(url: string, format: string, extension: string, accessToken?: string): string {
const urlObject = parseUrl(url);
if (!isMapboxURL(url)) {
urlObject.path += `${format}${extension}`;
return formatUrl(urlObject);
if (!isMapboxURL(url))
{
return `url${format}${extension}`;
}
const urlObject = parseUrl(url);
urlObject.path = `/styles/v1${urlObject.path}/sprite${format}${extension}`;
return this._makeAPIURL(urlObject, this._customAccessToken || accessToken);
}
Expand Down

0 comments on commit 51684e9

Please sign in to comment.