aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map/OSM.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-10-19 14:50:19 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-02-04 18:31:50 +0000
commitd4c2211cfc5b69f2777039088d91fe423f1c7c29 (patch)
treeb3af1be332503637f5b981cf611f47523a26ff7a /perllib/FixMyStreet/Map/OSM.pm
parent47befd5dcbb3fefc6c4d99b65ee125275c3d8509 (diff)
Update URL whenever map moves, using replaceState.
Fixes #2242. Co-authored-by: Matthew Somerville <matthew@mysociety.org>
Diffstat (limited to 'perllib/FixMyStreet/Map/OSM.pm')
-rw-r--r--perllib/FixMyStreet/Map/OSM.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm
index a6a95b48b..a6cb6acea 100644
--- a/perllib/FixMyStreet/Map/OSM.pm
+++ b/perllib/FixMyStreet/Map/OSM.pm
@@ -57,6 +57,7 @@ sub display_map {
if defined $c->get_param('lat');
$params{longitude} = Utils::truncate_coordinate($c->get_param('lon') + 0)
if defined $c->get_param('lon');
+ $params{zoomToBounds} = $params{any_zoom} && !defined $c->get_param('zoom');
my %data;
$data{cobrand} = $c->cobrand;