-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Removing a symbol layer and immediately readding it as a circle layer causes TypeError in draw_circle #3633
Comments
@jfirebaugh found this while adding a runtime-styling test for setStyle (changing a layer's type) -- do you think this should block #3621, or be left as a follow-up? (In the latter case, I could add an |
This sort of situation will be more common with #3621, so let's fix it first. |
👍 sounds good. On Wed, Nov 16, 2016 at 2:18 PM John Firebaugh notifications@github.com
|
Fixes #3633 by distinguishing the cases where the source tiles need to be _reloaded_ from those where they need to be _cleared_
Fixes #3633 by distinguishing the cases where the source tiles need to be _reloaded_ from those where they need to be _cleared_
Fixes #3633 by distinguishing the cases where the source tiles need to be _reloaded_ from those where they need to be _cleared_
mapbox-gl-js version: 0.27
Steps to Trigger Behavior
map.removeLayer('a'); map.addLayer({ id: 'a', type: 'circle', source: (same as the symbol layer) })
Expected Behavior
There are no errors
Actual Behavior
I think the problem is that, since this is happening in a single batch, the it's being treated by the source cache as an update--specifically, the tiles' states are set to
reloading
, so that they are still considered renderable. In the render pass that happens after the layer's been re-added but before the tile reloading is complete, we end up trying to render them as a circle-layer tiles, but the buffers aren't set up for that yet.The text was updated successfully, but these errors were encountered: