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

styleimagemissing emitted while Image operator deems the image available #8831

Closed
everhardt opened this issue Oct 3, 2019 · 2 comments · Fixed by #8839
Closed

styleimagemissing emitted while Image operator deems the image available #8831

everhardt opened this issue Oct 3, 2019 · 2 comments · Fixed by #8839
Labels

Comments

@everhardt
Copy link

I've started using the image operator in combination with coalesce on the icon-image layout property. I now see in the console sometimes the following error:

Image "{"name":"[redacted]","available":true}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.

It's differs from refresh to refresh which image gets this error, therefore I think it has to do with symbols that are to be displayed immediately after loading. And I suspect the issue to be that either:

  • the parser of the icon-image layout property does not know how to deal with an Image object instead of its name string
  • the coalesce and image operators has another definition of available than the parser of icon-image (as available is true)

mapbox-gl-js version: 1.4.0

browser: Chrome 77

@ansis ansis added the bug 🐞 label Oct 3, 2019
@ryanhamley
Copy link
Contributor

Hi @everhardt can you supply a minimal reproduction of the bug? If you can set up an example in something like JSBin, that would be extremely helpful for debugging the issue.

@everhardt
Copy link
Author

This shows the issue: https://codepen.io/everhardt/pen/OJJLayz

There are no icons rendered and in the console you see (among others):

Image "{"name":"zoo-11","available":true}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants