Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load additional Sprite #9224

Closed
webdeb opened this issue Jan 23, 2020 · 1 comment
Closed

load additional Sprite #9224

webdeb opened this issue Jan 23, 2020 · 1 comment

Comments

@webdeb
Copy link
Contributor

webdeb commented Jan 23, 2020

mapbox-gl-js version: 1.6.1

Question

how can I load an additional sprite?
I saw, that I could load an additional image with the addImage method, however this method loads images only one-by-one. I would like to load a complete sprite how it is defined by the api.

As I understood from the code, I would have to reimplement the logic in

this._spriteRequest = loadSprite(json.sprite, this.map._requestManager, (err, images) => {

Just wanted to ask, if you mind to expose it as a method of style so we could add multiple sprites after the initial loading?

style.loadSprite(url)

Thank you

@kkaefer
Copy link
Member

kkaefer commented Jan 24, 2020

See #9226 (comment)

@kkaefer kkaefer closed this as completed Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants