aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Around.pm
diff options
context:
space:
mode:
authorSteven Day <steve@mysociety.org>2015-08-12 17:42:41 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-05-02 13:34:54 +0100
commita344b99a0bf37134079afda51c6f963e1163904b (patch)
tree920bfa86c19113f9a2c99d401da885cea5e9f078 /perllib/FixMyStreet/App/Controller/Around.pm
parentb002374a885736b7436fc1c3132e50b6a1f8bdf9 (diff)
Allow cobrands to give extra parameters for pins.
So that you can build functionality to add extra limitations on to the map pins displayed. Useful for Collideoscope initially to filter out (or in) reports from the Department of Transport's Stats19 Data.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index ae7d83f55..bdf381294 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -257,12 +257,16 @@ sub map_features : Private {
return if $c->get_param('js'); # JS will request the same (or more) data client side
+ # Allow the cobrand to add in any additional query parameters
+ my $extra_params = $c->cobrand->call_hook('display_location_extra_params');
+
my ( $on_map, $nearby, $distance ) =
FixMyStreet::Map::map_features(
$c, %$extra,
categories => [ keys %{$c->stash->{filter_category}} ],
states => $c->stash->{filter_problem_states},
order => $c->stash->{sort_order},
+ extra => $extra_params,
);
my @pins;