refresh improvements

- cancel existing refrest timer on start zoom/drag
- add a manual refresh option into the status box when idle
This commit is contained in:
Jon Atkins
2013-05-06 23:08:44 +01:00
parent 42d5b8d8f9
commit 7248b17ea8
2 changed files with 6 additions and 3 deletions

View File

@ -236,8 +236,8 @@ window.setupMap = function() {
map.on('moveend zoomend', function() { window.mapRunsUserAction = false });
// update map hooks
map.on('movestart zoomstart', window.requests.abort);
map.on('moveend zoomend', function() { console.log('map moveend'); window.startRefreshTimeout(ON_MOVE_REFRESH*1000) });
map.on('movestart zoomstart', function() { window.requests.abort(); window.startRefreshTimeout(-1); });
map.on('moveend zoomend', function() { window.startRefreshTimeout(ON_MOVE_REFRESH*1000) });
window.addResumeFunction(window.requestData);
window.requests.addRefreshFunction(window.requestData);