aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm11
3 files changed, 16 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 1624f89e7..3d9f0a511 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -181,12 +181,7 @@ sub setup_request {
Memcached::set_namespace( FixMyStreet->config('FMS_DB_NAME') . ":" );
- my $map = $host =~ /^osm\./ ? 'OSM' : $c->req->param('map_override');
- #if ($c->sessionid) {
- # $map = $c->session->{map};
- # $map = undef unless $map eq 'OSM';
- #}
- FixMyStreet::Map::set_map_class( $map );
+ FixMyStreet::Map::set_map_class( $cobrand->map_type || $c->req->param('map_override') );
return $c;
}
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index d09937ac2..f7d885da2 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -43,6 +43,10 @@ sub example_places {
return ( 'BR1 3UH', 'Glebe Rd, Bromley' );
}
+sub map_type {
+ 'Bromley';
+}
+
sub on_map_default_max_pin_age {
return '1 month';
}
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index c0a0b1ff7..7a82d728d 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -351,6 +351,17 @@ Return the title to be used in page heads.
sub site_title { 'FixMyStreet' }
+=head2 map_type
+
+Return an override type of map if necessary.
+
+=cut
+sub map_type {
+ my $self = shift;
+ return 'OSM' if $self->{c}->req->uri->host =~ /^osm\./;
+ return;
+}
+
=head2 on_map_list_limit
Return the maximum number of items to be given in the list of reports on the map