Skip to content

Map.setStyle will unload all models #13579

@joshnice

Description

@joshnice

mapbox-gl-js version

v3.15.0

Browser and version

Chrome - 141

Expected behavior

When using setDiff the map shouldn't unload the models

Actual behavior

When using setDiff the models are unloaded and then disappear from the map

Link to the demonstration

https://jsbin.com/nonimuteyo/edit?html,output

Steps to trigger the unexpected behavior

  • Click the setDiff button which will call
map.setStyle({ ...map.getStyle() }, { diff: false });
  • Observe that the model disappears on the map
  • Click Load model button will call
map.addModel(modelId, modelOne)
  • The model will reappear on the map

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions