aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index bb5b13b61..ed851f71f 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -430,6 +430,12 @@ sub load_and_group_problems : Private {
$problems = $problems->to_body($c->stash->{body});
}
+ if (my $bbox = $c->get_param('bbox')) {
+ my ($min_lon, $min_lat, $max_lon, $max_lat) = split /,/, $bbox;
+ $where->{latitude} = { '>=', $min_lat, '<', $max_lat };
+ $where->{longitude} = { '>=', $min_lon, '<', $max_lon };
+ }
+
$problems = $problems->search(
$where,
$filter