aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Cobrand.pm2
-rw-r--r--perllib/Cobrands/Barnet/Util.pm4
-rw-r--r--perllib/Cobrands/Southampton/Util.pm4
-rw-r--r--perllib/FixMyStreet/Map/Tilma/Original.pm4
4 files changed, 12 insertions, 2 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index fa2dd9e88..b1ec6ba75 100644
--- a/perllib/Cobrand.pm
+++ b/perllib/Cobrand.pm
@@ -119,6 +119,8 @@ my %fns = (
# The MaPit types this site handles
'area_types' => { default => '[qw(DIS LBO MTD UTA CTY COI)]' },
'area_min_generation' => { default => '10' },
+ # Some cobrands that use a Tilma map have a smaller mid-point to make pin centred
+ 'tilma_mid_point' => { default => '""' },
);
foreach (keys %fns) {
diff --git a/perllib/Cobrands/Barnet/Util.pm b/perllib/Cobrands/Barnet/Util.pm
index 0e5ddcf68..e4115c232 100644
--- a/perllib/Cobrands/Barnet/Util.pm
+++ b/perllib/Cobrands/Barnet/Util.pm
@@ -109,5 +109,9 @@ sub recent_photos {
return Problems::recent_photos($num, $lat, $lon, $dist);
}
+sub tilma_mid_point {
+ return 189;
+}
+
1;
diff --git a/perllib/Cobrands/Southampton/Util.pm b/perllib/Cobrands/Southampton/Util.pm
index ee7d8e728..d29b53127 100644
--- a/perllib/Cobrands/Southampton/Util.pm
+++ b/perllib/Cobrands/Southampton/Util.pm
@@ -109,5 +109,9 @@ sub recent_photos {
return Problems::recent_photos($num, $lat, $lon, $dist);
}
+sub tilma_mid_point {
+ return 189;
+}
+
1;
diff --git a/perllib/FixMyStreet/Map/Tilma/Original.pm b/perllib/FixMyStreet/Map/Tilma/Original.pm
index 2a64b5bbb..0af6ed277 100644
--- a/perllib/FixMyStreet/Map/Tilma/Original.pm
+++ b/perllib/FixMyStreet/Map/Tilma/Original.pm
@@ -45,8 +45,8 @@ sub display_map {
$params{pre} ||= '';
$params{post} ||= '';
my $mid_point = TILE_WIDTH; # Map is 2 TILE_WIDTHs in size, square.
- if ($q->{site} eq 'barnet') { # Map is c. 380px wide
- $mid_point = 189;
+ if (my $mp = Cobrand::tilma_mid_point(Page::get_cobrand($q))) {
+ $mid_point = $mp;
}
# convert map center point to easting, northing