diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-07-13 15:13:36 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-08-01 11:52:22 +0100 |
commit | 0271c3fa016178f8c72b1192f1d0ed57437ec4c4 (patch) | |
tree | 1907ce9d863fb731a802ad0c2bc8065070d4eae4 /perllib/FixMyStreet/Map.pm | |
parent | 8699a41fbeb79816d9852a2d1231ebd690cdd0ba (diff) |
Add static map output view for a report.
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r-- | perllib/FixMyStreet/Map.pm | 5 |
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 { |