Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was 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

Description

@ivovandongen

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

Activity

  1. added
    Core
    on Sep 30, 2016
  2. jfirebaugh commented on Sep 30, 2016

    @jfirebaugh
    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.

  3. 1ec5 commented on Mar 4, 2017

    @1ec5
    Contributor

    Related: #6536.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Corebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions