7b5168acec
Previously, quickly zooming out and then back in sometimes left only overzoomed tiles for the lower zoom level visible. The problem was a race condition with deferred pruning: 1. Start at z15. Zoom in. This triggers loading of z14 tiles. As each tile loads, _pruneTiles (throttled) is called. This results in deferred removal of z15 tiles (250ms setTimeout). The deferral is done to avoid flicker while the z14 tiles are faded in. 2. During the 250ms, zoom in. This triggers `_addTiles`, but since the deferred pruning of the z15 tiles hasn't happened yet, the tiles are still present in `this._tiles`. Therefore no tiles are queued for loading, triggering an early return in `_addTiles`, before `_pruneTiles` is called. 3. Deferred pruning of the z15 tiles happens. Since `_pruneTiles` was short-circuited at z15, these tiles were never retained, nor were the z14 tiles scheduled for pruning. End result is that the z15 tiles are removed from the DOM while the z14 tiles remain, scaled 2x. |
||
---|---|---|
build | ||
debug | ||
dist | ||
spec | ||
src | ||
.gitignore | ||
.npmignore | ||
.travis.yml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
FAQ.md | ||
Jakefile.js | ||
LICENSE | ||
package.json | ||
PLUGIN-GUIDE.md | ||
README.md |
Leaflet is an open source JavaScript library for mobile-friendly interactive maps. It is developed by Vladimir Agafonkin of MapBox with a team of dedicated contributors. Weighing just about 30 KB of gzipped JS code, it has all the features most developers ever need for online maps.
Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms out of the box, taking advantage of HTML5 and CSS3 on modern browsers while being accessible on older ones too. It can be extended with a huge amount of plugins, has a beautiful, easy to use and well-documented API and a simple, readable source code that is a joy to contribute to.
For more info, docs and tutorials, check out the official website.
For Leaflet downloads (including the built master version), check out the download page.
We're happy to meet new contributors. If you want to get involved with Leaflet development, check out the contribution guide. Let's make the best mapping library that will ever exist, and push the limits of what's possible with online maps!