aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Council.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-08-17 22:56:37 +0100
committerStruan Donald <struan@exo.org.uk>2011-08-17 22:56:37 +0100
commit3b5d561700b184c20e63111d4cbc1daab78e16c6 (patch)
treef0c53c6bf8d4ebf12e5388053ad856fb0d0e7b86 /perllib/FixMyStreet/App/Controller/Council.pm
parent390f8e8ad1e10f832c4323c39bed2c883744a03f (diff)
parentf38b8e985697c35a62374a2f02dce2d681ef58cd (diff)
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into new_statuses
Conflicts: db/schema.sql perllib/FixMyStreet/App/Controller/Admin.pm perllib/FixMyStreet/DB/Result/User.pm t/app/controller/admin.t templates/web/default/admin/update_edit.html web/css/core.css
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Council.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Council.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Council.pm b/perllib/FixMyStreet/App/Controller/Council.pm
index 35e3d0d11..48248e4fe 100644
--- a/perllib/FixMyStreet/App/Controller/Council.pm
+++ b/perllib/FixMyStreet/App/Controller/Council.pm
@@ -48,12 +48,15 @@ sub load_and_check_councils : Private {
@area_types = $c->cobrand->area_types();
}
+ my $short_latitude = Utils::truncate_coordinate($latitude);
+ my $short_longitude = Utils::truncate_coordinate($longitude);
+
# TODO: I think we want in_gb_locale around the MaPit line, needs testing
my $all_councils;
if ( $c->stash->{fetch_all_areas} ) {
my %area_types = map { $_ => 1 } @area_types;
my $all_areas =
- mySociety::MaPit::call( 'point', "4326/$longitude,$latitude" );
+ mySociety::MaPit::call( 'point', "4326/$short_longitude,$short_latitude" );
$c->stash->{all_areas} = $all_areas;
$all_councils = {
map { $_ => $all_areas->{$_} }
@@ -62,7 +65,7 @@ sub load_and_check_councils : Private {
};
} else {
$all_councils =
- mySociety::MaPit::call( 'point', "4326/$longitude,$latitude",
+ mySociety::MaPit::call( 'point', "4326/$short_longitude,$short_latitude",
type => \@area_types );
}