diff options
| author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-11-02 22:35:06 +0100 |
|---|---|---|
| committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-11-02 22:35:06 +0100 |
| commit | b2c976a5a33f234de1f5c67de0e04034c21c20d8 (patch) | |
| tree | d302022329ac9d066ec9c7b9fca4b23a5f3c789c /searx/static | |
| parent | 740594a4b73952ad3f5fa52dd1bb939c73dcc7c2 (diff) | |
[enh] template_oscar: maxZoom if fitting bounds
Diffstat (limited to 'searx/static')
| -rw-r--r-- | searx/static/oscar/js/scripts.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/searx/static/oscar/js/scripts.js b/searx/static/oscar/js/scripts.js index 37285c9c9..4058fc039 100644 --- a/searx/static/oscar/js/scripts.js +++ b/searx/static/oscar/js/scripts.js @@ -100,7 +100,9 @@ $(document).ready(function(){ if(map_bounds) {
// TODO hack: https://github.com/Leaflet/Leaflet/issues/2021
setTimeout(function () {
- map.fitBounds(map_bounds);
+ map.fitBounds(map_bounds, {
+ maxZoom:17
+ });
}, 0);
} else if (map_lon && map_lat) {
if(map_zoom)
@@ -113,8 +115,8 @@ $(document).ready(function(){ if(map_geojson)
L.geoJson(map_geojson).addTo(map);
- //if(map_bounds)
- // L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);
+ /*else if(map_bounds)
+ L.rectangle(map_bounds, {color: "#ff7800", weight: 3, fill:false}).addTo(map);*/
});
// this event occour only once per element
|