question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Suggestion: pre-fetching surrounding (extra) tiles

See original GitHub issue

Hi,

How about adding an option to allow pre-fetching extra tiles? I believe it will improve user experience with fast network, since the user will not see white space ultil loading done. With slow network, it will spoil performance though. I’d apologize if this had been considered already.

--- leaflet-src.js      2017-05-28 10:30:08.435964020 +0900
+++ leaflet-src.js_tilemargin   2017-05-29 19:32:16.399501929 +0900
@@ -5486,9 +5486,10 @@
 
        _pxBoundsToTileRange: function (bounds) {
                var tileSize = this.getTileSize();
+               var margin = this.options.tileMargin;   // default: 0
                return new L.Bounds(
-                       bounds.min.unscaleBy(tileSize).floor(),
-                       bounds.max.unscaleBy(tileSize).ceil().subtract([1, 1]));
+                       bounds.min.unscaleBy(tileSize).floor().subtract([margin, margin]),
+                       bounds.max.unscaleBy(tileSize).ceil().add([margin - 1 , margin - 1]));
        },
 
        _noTilesToLoad: function () {

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
geoloepcommented, Jun 1, 2017

@SvenLauterbach Have you tried the padding option of the renderer you use? http://leafletjs.com/reference-1.0.3.html#renderer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic Prefetching of Data Tiles for ... - Computer Science
server to cache all neighboring tiles for every user. Furthermore, we may only have time to fetch a small number of tiles before...
Read more >
A Global User-Driven Model for Tile Prefetching in Web ...
The main purpose of a prefetching and caching model in GIS is to prefetch "hotspot" tiles from normal storage and put them into...
Read more >
Performance Tuning for Server side rendering - Daeja ... - IBM
The current default behavior of the viewer is to preFetch 7 pages +/- the current page* and to break down the page into...
Read more >
Prefetching Challenges in Distributed Memories for CMPs - UPC
When a prefetch request is issued, it is queued in the prefetch queue of the tile where it has to be resolved, so...
Read more >
Map Prefetch - APRSISCE/32 The future of Amateur Radio ...
After prefetching the tiles for a fairly large area, I zoom down a bit and continue prefetching more details and panning around fetching ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found