aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm6
-rw-r--r--perllib/FixMyStreet/Map/OSM.pm3
2 files changed, 5 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index b29415566..c93ca7334 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -172,7 +172,7 @@ sub display_location : Private {
# get the map features
my ( $on_map_all, $on_map, $around_map, $distance ) =
- FixMyStreet::Map::map_features( $c, $latitude, $longitude,
+ FixMyStreet::Map::map_features( $c, $short_latitude, $short_longitude,
$interval );
# copy the found reports to the stash
@@ -199,8 +199,8 @@ sub display_location : Private {
$c->stash->{page} = 'around'; # So the map knows to make clickable pins, update on pan
FixMyStreet::Map::display_map(
$c,
- latitude => $latitude,
- longitude => $longitude,
+ latitude => $short_latitude,
+ longitude => $short_longitude,
clickable => 1,
pins => \@pins,
);
diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm
index 05dc6ad39..c848c9e5e 100644
--- a/perllib/FixMyStreet/Map/OSM.pm
+++ b/perllib/FixMyStreet/Map/OSM.pm
@@ -59,7 +59,8 @@ sub display_map {
}
# Adjust zoom level dependent upon population density
- my $dist = mySociety::Gaze::get_radius_containing_population( $params{latitude}, $params{longitude}, 200_000 );
+ my $dist = $c->stash->{distance}
+ || mySociety::Gaze::get_radius_containing_population( $params{latitude}, $params{longitude}, 200_000 );
my $default_zoom = $numZoomLevels - 3;
$default_zoom = $numZoomLevels - 2 if $dist < 10;