diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-05-25 16:11:07 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-05-25 16:11:07 +0100 |
commit | c5ace4f09cb6a31942a4be688f883ca141ca6649 (patch) | |
tree | 0c534b1580b8863614d4ff9b6b720fe7835ff268 /perllib/FixMyStreet/App/Controller/Around.pm | |
parent | fe35ddba0fab0ebc413300dff0f1f323aec40e9a (diff) |
Get rid of pointless and hard-to-follow listrefs when referring to pins.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 11 |
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( |