aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-24 16:18:54 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-24 16:18:54 +0100
commit9be7fa6404bb1acc34a07e665b8ba4675b5261db (patch)
tree0764b9264b35122dd92f0b6b64381d97c25cc973 /templates/web/default
parent1571202964425b119ccf056495273e1653caad86 (diff)
Make zoom levels more configurable.
Diffstat (limited to 'templates/web/default')
-rw-r--r--templates/web/default/maps/openlayers.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/web/default/maps/openlayers.html b/templates/web/default/maps/openlayers.html
index ae670ce13..7da732913 100644
--- a/templates/web/default/maps/openlayers.html
+++ b/templates/web/default/maps/openlayers.html
@@ -12,6 +12,8 @@ var fixmystreet = {
[% IF map.zoom -%]
'zoom': [% map.zoom %],
[%- END %]
+ 'numZoomLevels': [% map.numZoomLevels %],
+ 'zoomOffset': [% map.zoomOffset %],
'map_type': [% map.map_type %],
'pins': [% INCLUDE maps/pins_js.html %]
}
@@ -51,9 +53,9 @@ var fixmystreet = {
east = c.uri_with( { lat = map.compass.east.0, lon = map.compass.east.1, zoom = map.zoom } )
west = c.uri_with( { lat = map.compass.west.0, lon = map.compass.west.1, zoom = map.zoom } )
world = c.uri_with( { zoom = 0 } );
- SET zoom_in = c.uri_with( { zoom = map.zoom + 1 } ) IF map.zoom < map.zoom_levels - 1;
+ SET zoom_in = c.uri_with( { zoom = map.zoom + 1 } ) IF map.zoom < map.numZoomLevels - 1;
SET zoom_out = c.uri_with( { zoom = map.zoom - 1 } ) IF map.zoom > 0;
- SET zoom_in = '#' IF map.zoom >= map.zoom_levels - 1;
+ SET zoom_in = '#' IF map.zoom >= map.numZoomLevels - 1;
SET zoom_out = '#' IF map.zoom <= 0;
%]
<div style="position: absolute; left: 4px; top: 4px; z-index: 1007;" class="olControlPanZoom olControlNoSelect" unselectable="on">