Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Updating sprite image is not reflected in currently rendered layers #6536

Closed
ivovandongen opened this issue Sep 30, 2016 · 2 comments · Fixed by #9213
Closed

Updating sprite image is not reflected in currently rendered layers #6536

ivovandongen opened this issue Sep 30, 2016 · 2 comments · Fixed by #9213
Labels
bug Core The cross-platform C++ core, aka mbgl

Comments

@ivovandongen
Copy link
Contributor

In #6375 an api is added to add and remove Sprite images. While implementing the bindings for Android (#6513) I noticed that updating a sprite doesn't affect anything visually.

Initial situation

  • Add a sprite image
  • Add a geojson source with a point
  • Add a symbol layer with that source and source-image set to the sprite image identifier

Sprite is displayed correctly,

Updating the sprite by adding a new image with the same identifier
Image is not updated

As the size of the sprite cannot be changed, a log entry is shown, nothing more. This might be confusing for developers. See: https://github.com/mapbox/mapbox-gl-native/blob/master/src/mbgl/sprite/sprite_atlas.cpp#L132

Update the sprite by first removing and then adding a sprite with the same identifier
Image is not updated

In this case; no log entry is shown, nothing happens visually.

cc @tmpsantos

@ivovandongen ivovandongen added the Core The cross-platform C++ core, aka mbgl label Sep 30, 2016
@tmpsantos tmpsantos added the bug label Sep 30, 2016
@jfirebaugh
Copy link
Contributor

Updating the sprite by adding a new image with the same identifier

I don't think we should allow this. If we want an update API, let's make it an explicit updateImage method.

@1ec5
Copy link
Contributor

1ec5 commented Mar 4, 2017

Related: #6536.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants