aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map/Tilma/Original.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-09 08:53:45 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-09 08:53:45 +0100
commit79edaacb35d12c0f7867aab899e016805e99268b (patch)
tree2e38a01d88e57445e06c8697cef742fab7b173d4 /perllib/FixMyStreet/Map/Tilma/Original.pm
parenta7fb8b236afb7f7f25008acdafdc5b0585e78b74 (diff)
parentba0bd42476b93908529f63bb8b71135ebf7a86ca (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 'perllib/FixMyStreet/Map/Tilma/Original.pm')
-rw-r--r--perllib/FixMyStreet/Map/Tilma/Original.pm25
1 files changed, 13 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/Map/Tilma/Original.pm b/perllib/FixMyStreet/Map/Tilma/Original.pm
index 486a7c739..6fa854cb2 100644
--- a/perllib/FixMyStreet/Map/Tilma/Original.pm
+++ b/perllib/FixMyStreet/Map/Tilma/Original.pm
@@ -107,21 +107,22 @@ sub map_pins {
my $pins = '';
foreach (@$around_map) {
- ( $_->{easting}, $_->{northing} ) =
- _ll_to_en( $_->{latitude}, $_->{longitude} );
- my $px = os_to_px($_->{easting}, $sx);
- my $py = os_to_px($_->{northing}, $sy, 1);
- my $col = $_->{state} eq 'fixed' ? 'green' : 'red';
- $pins .= display_pin($c, $px, $py, $col, $_->{id}, $_->{title});
+ my ( $easting, $northing ) =
+ _ll_to_en( $_->latitude, $_->longitude );
+ my $px = os_to_px($easting, $sx);
+ my $py = os_to_px($northing, $sy, 1);
+ my $col = $_->state eq 'fixed' ? 'green' : 'red';
+ $pins .= display_pin($c, $px, $py, $col, $_->id, $_->title);
}
foreach (@$nearby) {
- ( $_->{easting}, $_->{northing} ) =
- _ll_to_en( $_->{latitude}, $_->{longitude} );
- my $px = os_to_px($_->{easting}, $sx);
- my $py = os_to_px($_->{northing}, $sy, 1);
- my $col = $_->{state} eq 'fixed' ? 'green' : 'red';
- $pins .= display_pin($c, $px, $py, $col, $_->{id}, $_->{title});
+ my $p = $_->problem;
+ my ( $easting, $northing ) =
+ _ll_to_en( $p->latitude, $p->longitude );
+ my $px = os_to_px($easting, $sx);
+ my $py = os_to_px($northing, $sy, 1);
+ my $col = $p->state eq 'fixed' ? 'green' : 'red';
+ $pins .= display_pin($c, $px, $py, $col, $p->id, $p->title);
}
return ($pins, $around_map_list, $nearby, $dist);