internal cleanups on the API used to convert map zoom levels to the parameters needed to generate quadkeys for data tiles.

this should also prevent mixed release plugins/test IITC builds causing issues with it's 'show more portals' plugin
further changes are planned - by lying to the backend about the map zoom to optimise the portal detail level (density) returned and make better use of the data cache. needs some practical experimentation to get good adjustments, and a cleaner API for these plugins
This commit is contained in:
Jon Atkins
2014-02-22 05:48:52 +00:00
parent 336393a76d
commit 8ce28334cc
3 changed files with 40 additions and 40 deletions

View File

@ -279,16 +279,10 @@ window.androidPermalink = function() {
}
window.getMinPortalLevelForZoom = function(z) {
var ZOOM_TO_LEVEL = [8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 4, 4, 3, 2, 2, 1, 1];
return ZOOM_TO_LEVEL[z] || 0;
}
window.getMinPortalLevel = function() {
var z = map.getZoom();
return getMinPortalLevelForZoom(z);
return getMapZoomTileParameters(z).level;
}
// returns number of pixels left to scroll down before reaching the