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:
@ -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
|
||||
|
Reference in New Issue
Block a user