aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorSteven Day <steve@mysociety.org>2012-11-16 10:34:28 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-11-26 12:47:09 +0000
commit392a2bdda6a6f55b370476f2294dbbc8085fdfd7 (patch)
tree6e381c5aae26b4f1ebd06be0e63e8cd363303a71 /web/js
parent6fea8abb2f4770e4a16ae17fc5582124ff0a5420 (diff)
Re-arrange functions to please remote
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-wmts-zurich.js77
1 files changed, 39 insertions, 38 deletions
diff --git a/web/js/map-wmts-zurich.js b/web/js/map-wmts-zurich.js
index 12cf1286f..0244ad73e 100644
--- a/web/js/map-wmts-zurich.js
+++ b/web/js/map-wmts-zurich.js
@@ -2,43 +2,9 @@
* Maps for FMZ using Zurich council's WMTS tile server
*/
-/*
- * set_map_config() is called on dom ready in map-OpenLayers.js
- * to setup the way the map should operate.
- */
- function set_map_config(perm) {
- // This stuff is copied from js/map-bing-ol.js
- var permalink_id;
- if ($('#map_permalink').length) {
- permalink_id = 'map_permalink';
- }
-
- var nav_opts = { zoomWheelEnabled: false };
- if (fixmystreet.page == 'around' && $('html').hasClass('mobile')) {
- nav_opts = {};
- }
- fixmystreet.nav_control = new OpenLayers.Control.Navigation(nav_opts);
-
- fixmystreet.controls = [
- new OpenLayers.Control.Attribution(),
- new OpenLayers.Control.ArgParser(),
- fixmystreet.nav_control,
- new OpenLayers.Control.Permalink(permalink_id),
- new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' })
- ];
-
- fixmystreet.map_type = OpenLayers.Layer.WMTS;
-
- // Set DPI - default is 72
- OpenLayers.DOTS_PER_INCH = 96;
-
- // tell the main code to run our function instead
- // of setting the map up itself
- fixmystreet.map_setup = init_zurich_map;
-}
-
-/*
+ /*
* Copied from Mark/Matthew's demo of using Zurich's layers
+ * and merged with things that js/map-OpenLayers.js does
*/
function init_zurich_map(after) {
@@ -66,8 +32,8 @@ function init_zurich_map(after) {
// Mark/Matthew's
layer: "Luftbild",
matrixSet: "default028mm",
- // matrixSet: "nativeTileMatrixSet",
- requestEncoding: "REST",
+ //matrixSet: "nativeTileMatrixSet",
+ requestEncoding: "REST",
isBaseLayer: true,
// Things from the original map-OpenLayers.js
zoomOffset: fixmystreet.zoomOffset,
@@ -95,3 +61,38 @@ function init_zurich_map(after) {
},
'xml');
}
+
+/*
+ * set_map_config() is called on dom ready in map-OpenLayers.js
+ * to setup the way the map should operate.
+ */
+ function set_map_config(perm) {
+ // This stuff is copied from js/map-bing-ol.js
+ var permalink_id;
+ if ($('#map_permalink').length) {
+ permalink_id = 'map_permalink';
+ }
+
+ var nav_opts = { zoomWheelEnabled: false };
+ if (fixmystreet.page == 'around' && $('html').hasClass('mobile')) {
+ nav_opts = {};
+ }
+ fixmystreet.nav_control = new OpenLayers.Control.Navigation(nav_opts);
+
+ fixmystreet.controls = [
+ new OpenLayers.Control.Attribution(),
+ new OpenLayers.Control.ArgParser(),
+ fixmystreet.nav_control,
+ new OpenLayers.Control.Permalink(permalink_id),
+ new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' })
+ ];
+
+ fixmystreet.map_type = OpenLayers.Layer.WMTS;
+
+ // Set DPI - default is 72
+ OpenLayers.DOTS_PER_INCH = 96;
+
+ // tell the main code to run our function instead
+ // of setting the map up itself
+ fixmystreet.map_setup = init_zurich_map;
+}