aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Open311.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-04-01 10:47:11 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-04-04 17:50:55 +0100
commit98e61f99be442523fdfb38e95d9a8c2132ea0405 (patch)
tree4640cacbaf8392cb7c4df332a3a7bc6b19fb7b47 /perllib/FixMyStreet/App/Controller/Open311.pm
parent8ca5583e62b1c24128b8d691a8b5f5236ce99eef (diff)
Factor to common FixMyStreet::MapIt call.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Open311.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Open311.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Open311.pm b/perllib/FixMyStreet/App/Controller/Open311.pm
index 5d7ec63d6..97e1a782a 100644
--- a/perllib/FixMyStreet/App/Controller/Open311.pm
+++ b/perllib/FixMyStreet/App/Controller/Open311.pm
@@ -7,6 +7,7 @@ use namespace::autoclean;
use JSON::MaybeXS;
use XML::Simple;
use DateTime::Format::W3CDTF;
+use FixMyStreet::MapIt;
BEGIN { extends 'Catalyst::Controller'; }
@@ -164,12 +165,7 @@ sub get_services : Private {
if ($lat || $lon) {
my $area_types = $c->cobrand->area_types;
- my %params = ( type => $area_types );
- $params{generation} = $c->config->{MAPIT_GENERATION}
- if $c->config->{MAPIT_GENERATION};
- my $all_areas = mySociety::MaPit::call('point',
- "4326/$lon,$lat",
- %params);
+ my $all_areas = FixMyStreet::MapIt::call('point', "4326/$lon,$lat", type => $area_types);
$categories = $categories->search( {
'body_areas.area_id' => [ keys %$all_areas ],
}, { join => { 'body' => 'body_areas' } } );