Commit Graph

43 Commits

Author SHA1 Message Date
Tim Schaub
80df1f5ae8 Move opt_useCapture arg to the end of the list 2016-02-03 11:19:38 +01:00
Andreas Hocevar
3f2d79b7fe Replace goog.events.Event/EventTarget system with our own
This also removes goog.events.listen, goog.events.unlisten,
goog.events.unlistenByKey and goog.events.BrowserEvent.
2016-02-03 11:19:38 +01:00
Tim Schaub
13a981c94b Fewer blank lines 2016-01-11 22:03:23 -08:00
Petr Sloup
e1712eb44a Initiate tile load only after registering it as loading 2015-12-26 10:49:21 +01:00
Frederic Junod
7192644c07 Register the change callback when the tile is enqueued 2015-12-09 17:15:47 +01:00
Alessandro Isaacs
2142b538ac Greedify the queue loading strategy 2015-07-10 15:06:41 -07:00
Alessandro Isaacs
b57cdb730c Only load tiles that are not yet loaded 2015-07-10 15:06:35 -07:00
Éric Lemoine
f1d7e2ec85 Unregister tile change listeners
When the tile queue loads a tile it registers a "change" listener on that tile. But currently that listener is not unregistered, unless the tile cache containing that tile fills up and "dipose" is called on that tile.

This commit makes handleTileChange deregister the "change" listener on the tile, if the tile is now in "loaded" state.
2015-03-30 16:54:09 +02:00
Tim Schaub
bf35b40b11 Fire change event every time state changes 2015-02-17 11:09:16 -07:00
Tim Schaub
2ec63b6c58 Unnecessary ol.Tile requires 2014-06-27 19:57:54 -04:00
Tom Payne
fbc23499e4 Add @struct annotation for simple classes 2013-12-13 18:59:26 +01:00
Tom Payne
78380feb30 Use ol.structs.PriorityQueue template in ol.TileQueue 2013-11-19 21:19:23 +01:00
Frederic Junod
01cc19af80 More precise {function} jsdoc definition 2013-11-07 16:03:19 +01:00
Tom Payne
e12b30ba91 Remove incorrect assert, thanks @elemoine 2013-04-09 12:18:04 +02:00
Tom Payne
6f49cb8abe Assert that loadMoreTiles is only called when more tiles will be loaded 2013-04-08 12:12:25 +02:00
Tom Payne
60a913aef3 Compute number of new tiles to load exactly 2013-04-07 19:12:40 +02:00
Tom Payne
5b133d40d9 Only reprioritize tile queue when more tiles will be loaded 2013-04-07 18:31:56 +02:00
Tom Payne
b93283e8f3 Boost number of loading tiles when not animating or interacting 2013-04-07 18:25:19 +02:00
Tom Payne
da6f4cc764 Make maximum number of tiles loading a parameter to loadMoreTiles 2013-04-07 18:10:19 +02:00
Tom Payne
0e12d16c37 Move configuration of maximum tiles loading into map.js 2013-04-04 23:49:21 +02:00
Tom Payne
71d1207201 Start a maximum of two new tile downloads per frame 2013-04-04 23:33:18 +02:00
Tom Payne
27f9e83780 Refactor ol.TileQueue to extend ol.structs.PriorityQueue 2013-03-27 14:34:28 +01:00
Tom Payne
80df629319 Premptively load low resolution tiles 2013-03-22 21:02:09 +01:00
Éric Lemoine
1d575309da Tile renderers needn't listen for tile change 2013-03-21 10:29:01 +01:00
Éric Lemoine
f55423d575 Register change listeners for loading tiles only
With this commit we register a change listener at a time when we are guaranteed that the listener will be called. In this was we don't need to remove listeners when the tile is dropped from the tile queue. And to avoid busy-polling between IDLE and LOADING we rely on the map to call requestRenderFrame when new tiles change to LOADING from IDLE.
2013-03-07 11:03:20 +01:00
Éric Lemoine
7fabff5ffa Revert "Remove listeners when dropping tiles"
This reverts commit fd6aaff2f5.
2013-03-07 10:41:23 +01:00
Éric Lemoine
fd6aaff2f5 Remove listeners when dropping tiles 2013-03-05 17:01:34 +01:00
Tim Schaub
f5c627ab51 Only listen once for tile events
Assuming browser garbage collection cannot happen while we have listeners in the global registry, we need to listenOnce to avoid memory leaks with the tile queue.
2013-02-13 15:37:33 -07:00
Éric Lemoine
7f38c1683e Remove unused TileQueue clear method 2013-01-20 15:15:13 +01:00
Tom Payne
9ef5f0b060 Ensure dropped tiles are properly removed from tile queue 2013-01-19 21:58:01 +01:00
Tom Payne
d43abba154 Use stricter types in private methods, operate on array directly 2013-01-19 15:52:55 +01:00
Tom Payne
6507e71dd7 Clear queued tile keys when queue is cleared 2013-01-19 15:44:01 +01:00
Tom Payne
2bdfd3765b Remove stale FIXME 2013-01-19 15:38:15 +01:00
Tom Payne
4b971b5f32 Optimize tile dropping in reprioritize 2013-01-19 15:24:50 +01:00
Tom Payne
a8dc810696 Use Infinity rather than undefined to drop tiles 2013-01-19 15:24:02 +01:00
Tom Payne
1c524caae6 Discard unwanted tiles from tile queue 2013-01-19 15:03:01 +01:00
Éric Lemoine
c0c9cdef15 New tile queue implementation (heapify-powered) 2013-01-18 21:02:09 +01:00
Tom Payne
be3849d1b8 Use dequeue rather than remove, thanks @elemoine 2013-01-13 22:28:37 +01:00
Tom Payne
deeb7b3294 Fix typecast 2013-01-12 22:52:44 +01:00
Tom Payne
b803aad5a8 Don't enqueue tiles which are not idle 2013-01-12 16:55:36 +01:00
Tom Payne
3d5c76c346 Add empty descriptions for jsdoc 2013-01-12 13:32:57 +01:00
Éric Lemoine
25be29099f Improved reprioritization 2013-01-11 18:13:36 +01:00
Tom Payne
52df441cf8 Add tile queue 2013-01-11 16:18:07 +01:00