force rounding to integer the result of map.getZoom() when calculating the map data zoom
it's not something that sould happen, but it's been seen on mobile (#271) - this should eliminate the issues with portal data this causes
This commit is contained in:
@ -247,6 +247,9 @@ window.renderLimitReached = function(ratio) {
|
||||
window.getPortalDataZoom = function() {
|
||||
var z = map.getZoom();
|
||||
|
||||
// on mobile (at least), the map zoom has been non-integer occasionally. fix it.
|
||||
z = Math.floor(z);
|
||||
|
||||
// limiting the mazimum zoom level for data retrieval reduces the number of requests at high zoom levels
|
||||
// (as all portal data is retrieved at z=17, why retrieve multiple z=18 tiles when fewer z=17 would do?)
|
||||
// very effective along with the new cache code
|
||||
|
Reference in New Issue
Block a user