aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Page.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/Page.pm')
-rw-r--r--perllib/Page.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 88eb9a754..abc136d08 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.139 2009-02-14 11:30:49 matthew Exp $
+# $Id: Page.pm,v 1.140 2009-02-16 18:56:44 matthew Exp $
#
package Page;
@@ -397,10 +397,11 @@ sub map_pins {
$pins .= Page::display_pin($q, $px, $py, $col);
}
- mySociety::Locale::push('en-gb');
- my ($lat, $lon) = mySociety::GeoUtil::national_grid_to_wgs84($mid_e, $mid_n, 'G');
- my $dist = mySociety::Gaze::get_radius_containing_population($lat, $lon, 200000);
- mySociety::Locale::pop();
+ my $dist;
+ mySociety::Locale::in_gb_locale {
+ my ($lat, $lon) = mySociety::GeoUtil::national_grid_to_wgs84($mid_e, $mid_n, 'G');
+ $dist = mySociety::Gaze::get_radius_containing_population($lat, $lon, 200000);
+ };
$dist = int($dist*10+0.5)/10;
my $limit = 20; # - @$current_map;