aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/js/config.js-example6
-rw-r--r--www/js/map-OpenLayers.js2
2 files changed, 6 insertions, 2 deletions
diff --git a/www/js/config.js-example b/www/js/config.js-example
index 6260aef..a221cb0 100644
--- a/www/js/config.js-example
+++ b/www/js/config.js-example
@@ -52,7 +52,11 @@ var CONFIG = {
// If this is true then the user must login as the first step after
// installing the app, and before making any reports.
- LOGIN_REQUIRED: false
+ LOGIN_REQUIRED: false,
+
+ // The ratio of the data bounds to the viewport bounds (in each dimension).
+ // See http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Strategy/BBOX-js.html
+ MAP_LOADING_RATIO: 2
};
diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js
index d458641..a3fdc9d 100644
--- a/www/js/map-OpenLayers.js
+++ b/www/js/map-OpenLayers.js
@@ -128,7 +128,7 @@ function fixmystreet_onload() {
fixmystreet.map.addLayer(fixmystreet.report_location);
if (fixmystreet.page == 'around') {
- fixmystreet.bbox_strategy = new OpenLayers.Strategy.BBOX({ ratio: 1 });
+ fixmystreet.bbox_strategy = new OpenLayers.Strategy.BBOX({ ratio: CONFIG.MAP_LOADING_RATIO });
pin_layer_options.strategies = [ fixmystreet.bbox_strategy ];
pin_layer_options.protocol = new OpenLayers.Protocol.HTTP({
url: CONFIG.FMS_URL + '/ajax',