Created
January 19, 2012 12:31
-
-
Save RicSwirrl/1639834 to your computer and use it in GitHub Desktop.
MapManager refresh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MapManager.prototype = { | |
refresh: function() { | |
$(this).trigger('started'); | |
errored = false; | |
// clear these variables for this refresh | |
if (map.getZoom() > minZoom) { | |
$(this).trigger('zoomOK'); | |
var tiles = getTiles(); | |
deleteOldTilesData(tiles); | |
newTiles = getNewTiles(tiles); | |
// remember this set of tiles for comparison next time. | |
prevTiles = tiles; | |
// TODO: also get the boundary data. | |
lsoaDataRetrieved = false; | |
getLsoaData(newTiles); | |
} else { | |
$(this).trigger('zoomTooWide'); | |
$(this).trigger('finished'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment