diff options
Diffstat (limited to 'perllib/FixMyStreet/Map/OSM.pm')
-rw-r--r-- | perllib/FixMyStreet/Map/OSM.pm | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm index 971f88fd7..aeece3960 100644 --- a/perllib/FixMyStreet/Map/OSM.pm +++ b/perllib/FixMyStreet/Map/OSM.pm @@ -52,18 +52,8 @@ sub display_map { my $zoom_act = 14 + $zoom; my ($x_tile, $y_tile) = latlon_to_tile_with_adjust($params{latitude}, $params{longitude}, $zoom_act); - my @pins; foreach my $pin (@{$params{pins}}) { - my ($px, $py) = latlon_to_px($pin->[0], $pin->[1], $x_tile, $y_tile, $zoom_act); - push @pins, { - lat => $pin->[0], - lon => $pin->[1], - px => $px, - py => $py, - col => $pin->[2], - id => $pin->[3], - title => $pin->[4], - }; + ($pin->{px}, $pin->{py}) = latlon_to_px($pin->{latitude}, $pin->{longitude}, $x_tile, $y_tile, $zoom_act); } my $compass = { @@ -85,7 +75,7 @@ sub display_map { y_tile => $y_tile, zoom => $zoom, zoom_act => $zoom_act, - pins => \@pins, + pins => $params{pins}, compass => $compass, }; } |