aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Council.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Council.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Council.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Council.pm b/perllib/FixMyStreet/App/Controller/Council.pm
index ceec04027..8a174c254 100644
--- a/perllib/FixMyStreet/App/Controller/Council.pm
+++ b/perllib/FixMyStreet/App/Controller/Council.pm
@@ -53,10 +53,16 @@ sub load_and_check_areas : Private {
my $short_longitude = Utils::truncate_coordinate($longitude);
my $all_areas;
+
+ my %params;
+ $params{generation} = $c->config->{MAPIT_GENERATION}
+ if $c->config->{MAPIT_GENERATION};
+
if ( $c->stash->{fetch_all_areas} ) {
my %area_types = map { $_ => 1 } @$area_types;
$all_areas =
- mySociety::MaPit::call( 'point', "4326/$short_longitude,$short_latitude" );
+ mySociety::MaPit::call( 'point',
+ "4326/$short_longitude,$short_latitude", %params );
$c->stash->{all_areas_mapit} = $all_areas;
$all_areas = {
map { $_ => $all_areas->{$_} }
@@ -65,7 +71,8 @@ sub load_and_check_areas : Private {
};
} else {
$all_areas =
- mySociety::MaPit::call( 'point', "4326/$short_longitude,$short_latitude",
+ mySociety::MaPit::call( 'point',
+ "4326/$short_longitude,$short_latitude", %params,
type => $area_types );
}
if ($all_areas->{error}) {