diff options
author | Struan Donald <struan@exo.org.uk> | 2011-08-16 10:38:49 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-08-16 10:38:49 +0100 |
commit | c104ae8c1d72eb25ba60686b58f01da148dc081f (patch) | |
tree | 83bbf971b4d4ca305452bdfaacf50cd30ae5317c /perllib/FixMyStreet/App/Controller/Council.pm | |
parent | 213948dcc9c281b1873da98e381b25231c376165 (diff) | |
parent | f6ddc9d4db2e272d725e7ed44fb4d828d99d3b61 (diff) |
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into open311-consumer
Conflicts:
db/schema.sql
perllib/FixMyStreet/DB/Result/Problem.pm
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Council.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Council.pm | 7 |
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 ); } |