diff --git a/code/boot.js b/code/boot.js index 876a854f..7d5a45ec 100644 --- a/code/boot.js +++ b/code/boot.js @@ -192,6 +192,7 @@ window.setupMap = function() { 'Google Hybrid': views[4], 'Google Terrain': views[5] }, addLayers); + // Remove the hidden layer after layerChooser built, to avoid messing up ordering of layers $.each(hiddenLayer, function(ind, layer){ map.removeLayer(layer); diff --git a/code/map_data.js b/code/map_data.js index 37729ed1..1e1fb92c 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -14,7 +14,7 @@ window.requestData = function() { var bounds = clampLatLngBounds(map.getBounds()); - //we query the server as if the zoom level was effectiveZoom + //we query the server as if the zoom level was this. it may not match the actual map zoom level var z = getPortalDataZoom(); var x1 = lngToTile(bounds.getWest(), z);