aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-08-15 09:55:17 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-08-15 09:55:17 +0100
commitf89c3f01f78db789e175818fbb9398cd886bb05b (patch)
tree399b802060ab2deaaf118af296794892b6019d2a
parent37cd512bb5673e75dbfe52ed3fb183764c9749d3 (diff)
parent2c84295d33b95c745bc1f1964b82c06d8d36cb2f (diff)
Merge commit 'petter/catalyst_mapit_point'
-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 );
}