aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Around.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-25 16:43:40 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-25 16:43:40 +0100
commitd974cc0258d26a366262bce7b456d39b0c71a40b (patch)
tree03534cbf86dcf83a36df3839ff49e70cbf458b5b /perllib/FixMyStreet/App/Controller/Around.pm
parent6a679dbe9f0d7021f176ca23106a74bc2475539e (diff)
parentc5ace4f09cb6a31942a4be688f883ca141ca6649 (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index 38e6025db..ac665055b 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -180,10 +180,13 @@ sub display_location : Private {
$c->stash->{distance} = $distance;
# create a list of all the pins
- my @pins = map {
- my $pin_colour = $_->{state} eq 'fixed' ? 'green' : 'red';
- [ $_->{latitude}, $_->{longitude}, $pin_colour, $_->{id}, $_->{title} ];
- } @$on_map_all, @$around_map;
+ my @pins = map { {
+ latitude => $_->{latitude},
+ longitude => $_->{longitude},
+ colour => $_->{state} eq 'fixed' ? 'green' : 'red',
+ id => $_->{id},
+ title => $_->{title},
+ } } @$on_map_all, @$around_map;
{ # FIXME - ideally this indented code should be in the templates
$c->stash->{map_html} = FixMyStreet::Map::display_map(