From 7ee40b5b45e2841c885d35c0be21612e40dbb621 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sun, 4 May 2014 03:10:50 +0100 Subject: [PATCH] make the 'default intel detail level' act more like the stock map - a partial workaround for some portals not being returned for zoom levels 16/17 sometimes also, 'show more portals' plugin has less impact in this case too --- code/map_data_calc_tools.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/map_data_calc_tools.js b/code/map_data_calc_tools.js index d8891fd9..98fbca52 100755 --- a/code/map_data_calc_tools.js +++ b/code/map_data_calc_tools.js @@ -48,8 +48,9 @@ window.getDataZoomForMapZoom = function(zoom) { //NOTE: the specifics of this are tightly coupled with the above ZOOM_TO_LEVEL and ZOOM_TO_TILES_PER_EDGE arrays // firstly, some of IITCs zoom levels, depending on base map layer, can be higher than stock. limit zoom level - if (zoom > 18) { - zoom = 18; + // (stock site max zoom may vary depending on google maps detail in the area - 20 or 21 max is common) + if (zoom > 20) { + zoom = 20; } if (!window.CONFIG_ZOOM_DEFAULT_DETAIL_LEVEL) { @@ -109,7 +110,7 @@ window.getDataZoomForMapZoom = function(zoom) { } if (window.CONFIG_ZOOM_SHOW_MORE_PORTALS) { - if (zoom >= 15) { + if (zoom >= 15 && zoom <= 16) { //L1+ and closer zooms. the 'all portals' zoom uses the same tile size, so it's no harm to request things at that zoom level zoom = 17; }