aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Map/Zurich.pm16
-rw-r--r--web/js/map-wmts-zurich.js4
2 files changed, 7 insertions, 13 deletions
diff --git a/perllib/FixMyStreet/Map/Zurich.pm b/perllib/FixMyStreet/Map/Zurich.pm
index a913b39bc..3d343c6ac 100644
--- a/perllib/FixMyStreet/Map/Zurich.pm
+++ b/perllib/FixMyStreet/Map/Zurich.pm
@@ -1,14 +1,13 @@
#!/usr/bin/perl
#
# FixMyStreet:Map::Zurich
-# Zurich have their own tileserver serving aerial photos instead
-# of street maps.
+# Zurich have their own tileserver.
#
# Copyright (c) 2012 UK Citizens Online Democracy. All rights reserved.
# Email: steve@mysociety.org; WWW: http://www.mysociety.org/
package FixMyStreet::Map::Zurich;
-use base 'FixMyStreet::Map::FMS';
+use base 'FixMyStreet::Map::OSM';
use strict;
@@ -21,19 +20,18 @@ sub map_template {
}
sub base_tile_url {
- return 'http://www.wmts.stadt-zuerich.ch/Luftbild/MapServer/WMTS/tile/';
+ return 'http://www.wmts.stadt-zuerich.ch/Luftbild/MapServer/WMTS/tile/1.0.0/Luftbild/default/default028mm';
}
-# TODO - totally wrong probably - how do we actually do this?
sub map_tiles {
my ( $self, %params ) = @_;
my ( $x, $y, $z ) = ( $params{x_tile}, $params{y_tile}, $params{zoom_act} );
my $tile_url = $self->base_tile_url();
return [
- "$tile_url/$z/" . ($x - 1) . "/" . ($y - 1),
- "$tile_url/$z/$x/" . ($y - 1),
- "$tile_url/$z/" . ($x - 1) . "/$y",
- "$tile_url/$z/$x/$y",
+ "$tile_url/$z/" . ($x - 1) . "/" . ($y - 1) . ".jpg",
+ "$tile_url/$z/$x/" . ($y - 1) . ".jpg",
+ "$tile_url/$z/" . ($x - 1) . "/$y.jpg",
+ "$tile_url/$z/$x/$y.jpg",
];
}
diff --git a/web/js/map-wmts-zurich.js b/web/js/map-wmts-zurich.js
index 231b87786..8723d557c 100644
--- a/web/js/map-wmts-zurich.js
+++ b/web/js/map-wmts-zurich.js
@@ -12,9 +12,6 @@ function init_zurich_map(after) {
projection: new OpenLayers.Projection("EPSG:21781"),
displayProjection: new OpenLayers.Projection("EPSG:21781"),
maxExtent: new OpenLayers.Bounds(676000,241000,690000,255000),
- //projection: new OpenLayers.Projection("EPSG:4326"),
- //displayProjection: new OpenLayers.Projection("EPSG:4326"),
- //maxExtent: new OpenLayers.Bounds(8.444933818976226,47.31509040172551,8.632922236617937,47.442777990747416),
units: 'm',
scales: [ '250000', '125000', '64000', '32000', '16000', '8000', '4000', '2000', '1000', '500'],
controls: fixmystreet.controls
@@ -47,7 +44,6 @@ function init_zurich_map(after) {
// For some reason with OpenLayers 2.11 the format
// returns a KVP url not a REST one, despite the settings
// we have above, so for now I'm hardcoding the right one
- //layer.url = layer.url.replace('arcgis/rest/services/', '');
layer.url = "http://www.wmts.stadt-zuerich.ch/Luftbild/MapServer/WMTS/tile/";
fixmystreet.map.addLayer(layer);