Skip to content

[Maps] Apply tile styles before waiting for _tileLoadErrorTracker timer to expire#29798

Merged
nreese merged 2 commits intoelastic:masterfrom
nreese:tile_reloading
Feb 1, 2019
Merged

[Maps] Apply tile styles before waiting for _tileLoadErrorTracker timer to expire#29798
nreese merged 2 commits intoelastic:masterfrom
nreese:tile_reloading

Conversation

@nreese
Copy link
Copy Markdown
Contributor

@nreese nreese commented Feb 1, 2019

#28852 introduced a bug causing all tiles to be re-fetched. There are 2 ways to view the bug

  1. Open a map and wait 32 seconds (the time needed for TileLayer._tileLoadErrorTracker timer to expire). Notice how all the tiles flicker because they are being re-fetched
  2. Open the map and do something that causes getLayerList to return a different array so TileLayer.syncLayerWithMB is triggered. An easy one is changing the time range. Notice how all the tiles flicker because there are being re-fetched.

The bug occurs because for some unknown reason, calling mbMap.setLayerZoomRange with new min/max causes mapbox-gl to re-request all tiles (I opened an issue to figure out why mapbox/mapbox-gl-js#7865). In our case, we should not wait until after this._tileLoadErrorTracker has fired to set the layer properties.

@nreese nreese added v7.0.0 Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v6.7.0 labels Feb 1, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-gis

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@nreese nreese merged commit 37f507e into elastic:master Feb 1, 2019
nreese added a commit to nreese/kibana that referenced this pull request Feb 1, 2019
…er to expire (elastic#29798)

* [Maps] avoid re-loading tiles after

* set starting min and max to values provided from descriptor
nreese added a commit that referenced this pull request Feb 1, 2019
…er to expire (#29798) (#29801)

* [Maps] avoid re-loading tiles after

* set starting min and max to values provided from descriptor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v6.7.0 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants