aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Map/WMTSBase.pm5
-rw-r--r--perllib/FixMyStreet/Map/Zurich.pm4
2 files changed, 4 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/Map/WMTSBase.pm b/perllib/FixMyStreet/Map/WMTSBase.pm
index c0e002e6a..909ada1d6 100644
--- a/perllib/FixMyStreet/Map/WMTSBase.pm
+++ b/perllib/FixMyStreet/Map/WMTSBase.pm
@@ -241,7 +241,7 @@ sub latlon_to_tile($$$$) {
lon => $tile_params->{origin_x},
lat => $tile_params->{origin_y}
};
- my $res = $scales[$matrix_id] /
+ my $res = $scales[$zoom] /
($tile_params->{inches_per_unit} * $tile_params->{dpi});
# OpenLayers.INCHES_PER_UNIT[units] * OpenLayers.DOTS_PER_INCH
@@ -282,13 +282,12 @@ sub tile_to_latlon {
my ($self, $fx, $fy, $zoom) = @_;
my $tile_params = $self->tile_parameters;
- my $matrix_id = $zoom + $self->zoom_parameters->{id_offset};
my @scales = $self->scales;
my $tileOrigin = {
lon => $tile_params->{origin_x},
lat => $tile_params->{origin_y}
};
- my $res = $scales[$matrix_id] /
+ my $res = $scales[$zoom] /
($tile_params->{inches_per_unit} * $tile_params->{dpi});
# OpenLayers.INCHES_PER_UNIT[units] * OpenLayers.DOTS_PER_INCH
diff --git a/perllib/FixMyStreet/Map/Zurich.pm b/perllib/FixMyStreet/Map/Zurich.pm
index 3b97f947f..1e302bdda 100644
--- a/perllib/FixMyStreet/Map/Zurich.pm
+++ b/perllib/FixMyStreet/Map/Zurich.pm
@@ -13,7 +13,7 @@ sub zoom_parameters {
zoom_levels => scalar $self->scales,
default_zoom => 5,
min_zoom_level => 0,
- id_offset => 0,
+ id_offset => 2,
};
return $params;
}
@@ -29,7 +29,7 @@ sub tile_parameters {
wmts_version => '1.0.0',
layer_style => 'default',
matrix_set => 'default028mm',
- suffix => '', # appended to tile URLs
+ suffix => '.jpg', # appended to tile URLs
size => 512, # pixels
dpi => 96,
inches_per_unit => 39.3701, # BNG uses metres