aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-04-22 16:48:57 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-05-18 12:57:52 +0100
commit1a1bfff12415a7793fee22bcd4e5e39e10dbd4d3 (patch)
tree6313f583e4e278ad3fb2885b8bd0493bd429b23c /perllib/FixMyStreet/Map.pm
parent66d93ceaed9df6ff3e0e28a62e655ad769c99614 (diff)
Fallback if request to Gaze fails.
Fixes #1286.
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r--perllib/FixMyStreet/Map.pm10
1 files changed, 2 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm
index 81b81f656..6d641331f 100644
--- a/perllib/FixMyStreet/Map.pm
+++ b/perllib/FixMyStreet/Map.pm
@@ -16,7 +16,7 @@ use Module::Pluggable
# Get the list of maps we want and load map classes at compile time
my @ALL_MAP_CLASSES = allowed_maps();
-use mySociety::Gaze;
+use FixMyStreet::Gaze;
use mySociety::Locale;
use Utils;
@@ -105,13 +105,7 @@ sub _map_features {
? $c->cobrand->problems->around_map( @around_args, $around_limit, $category, $states )
: $around_map;
- my $dist;
- mySociety::Locale::in_gb_locale {
- $dist =
- mySociety::Gaze::get_radius_containing_population( $lat, $lon,
- 200000 );
- };
- $dist = int( $dist * 10 + 0.5 ) / 10;
+ my $dist = FixMyStreet::Gaze::get_radius_containing_population( $lat, $lon );
my $limit = 20;
my @ids = map { $_->id } @$around_map_list;