aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-07-13 15:13:36 +0100
committerDave Arter <davea@mysociety.org>2016-08-01 11:52:22 +0100
commit0271c3fa016178f8c72b1192f1d0ed57437ec4c4 (patch)
tree1907ce9d863fb731a802ad0c2bc8065070d4eae4 /perllib/FixMyStreet/Map.pm
parent8699a41fbeb79816d9852a2d1231ebd690cdd0ba (diff)
Add static map output view for a report.
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r--perllib/FixMyStreet/Map.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm
index 355fd8666..a850492b9 100644
--- a/perllib/FixMyStreet/Map.pm
+++ b/perllib/FixMyStreet/Map.pm
@@ -47,7 +47,8 @@ sub reload_allowed_maps {
=head2 map_class
-Set and return the appropriate class given a query parameter string.
+Sets the appropriate class given a query parameter string.
+Returns the old map class, if any.
=cut
@@ -57,7 +58,9 @@ sub set_map_class {
$str = __PACKAGE__.'::'.$str if $str;
my %avail = map { $_ => 1 } @ALL_MAP_CLASSES;
$str = $ALL_MAP_CLASSES[0] unless $str && $avail{$str};
+ my $old_map_class = $map_class;
$map_class = $str;
+ return $old_map_class;
}
sub display_map {