aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map
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
parent66d93ceaed9df6ff3e0e28a62e655ad769c99614 (diff)
Fallback if request to Gaze fails.
Fixes #1286.
Diffstat (limited to 'perllib/FixMyStreet/Map')
-rw-r--r--perllib/FixMyStreet/Map/Google.pm4
-rw-r--r--perllib/FixMyStreet/Map/OSM.pm4
2 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Map/Google.pm b/perllib/FixMyStreet/Map/Google.pm
index 46823f358..8ddf4f4e9 100644
--- a/perllib/FixMyStreet/Map/Google.pm
+++ b/perllib/FixMyStreet/Map/Google.pm
@@ -7,7 +7,7 @@
package FixMyStreet::Map::Google;
use strict;
-use mySociety::Gaze;
+use FixMyStreet::Gaze;
use Utils;
use constant ZOOM_LEVELS => 6;
@@ -30,7 +30,7 @@ sub display_map {
# Adjust zoom level dependent upon population density
my $dist = $c->stash->{distance}
- || mySociety::Gaze::get_radius_containing_population( $params{latitude}, $params{longitude}, 200_000 );
+ || FixMyStreet::Gaze::get_radius_containing_population( $params{latitude}, $params{longitude} );
my $default_zoom = $c->cobrand->default_map_zoom() ? $c->cobrand->default_map_zoom() : $numZoomLevels - 4;
$default_zoom = $numZoomLevels - 3 if $dist < 10;
diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm
index 7d91a9ee7..ae9e73a0a 100644
--- a/perllib/FixMyStreet/Map/OSM.pm
+++ b/perllib/FixMyStreet/Map/OSM.pm
@@ -8,7 +8,7 @@ package FixMyStreet::Map::OSM;
use strict;
use Math::Trig;
-use mySociety::Gaze;
+use FixMyStreet::Gaze;
use Utils;
use constant ZOOM_LEVELS => 6;
@@ -59,7 +59,7 @@ sub display_map {
# Adjust zoom level dependent upon population density
my $dist = $c->stash->{distance}
- || mySociety::Gaze::get_radius_containing_population( $params{latitude}, $params{longitude}, 200_000 );
+ || FixMyStreet::Gaze::get_radius_containing_population( $params{latitude}, $params{longitude} );
my $default_zoom = $c->cobrand->default_map_zoom() ? $c->cobrand->default_map_zoom() : $numZoomLevels - 4;
$default_zoom = $numZoomLevels - 3 if $dist < 10;