diff options
author | Matthew Somerville <matthew@dracos.co.uk> | 2011-02-10 18:08:23 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@dracos.co.uk> | 2011-02-10 18:08:23 +0000 |
commit | cf347f8fbce0fefa4f8da01a867bfe523bbe5dc0 (patch) | |
tree | fab61e09c92ceef76925b918e1842d3b8be1047b | |
parent | 8e6838736d5b70a03c57124bd08ed383079cc737 (diff) |
Couple more places truncated co-ords can be used.
-rwxr-xr-x | web/index.cgi | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/web/index.cgi b/web/index.cgi index 400d9e515..af89fc8cf 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -1008,11 +1008,16 @@ sub display_problem { my $google_link = Cobrand::base_url_for_emails($cobrand, $extra_data) . '/report/' . $problem->{id}; + # truncate the lat,lon for nicer rss urls + my ( $short_lat, $short_lon ) = + map { Utils::truncate_coordinate($_) } # + ( $problem->{latitude}, $problem->{longitude} ); + my $map_links = "<p id='sub_map_links'>" . "<a href=\"http://maps.google.co.uk/maps?output=embed&z=16&q=" . URI::Escape::uri_escape_utf8( $problem->{title} . ' - ' . $google_link ) - . "\@$problem->{latitude},$problem->{longitude}\">View on Google Maps</a></p>"; + . "\@$short_lat,$short_lon\">View on Google Maps</a></p>"; my $banner; if ($q->{site} ne 'emptyhomes' && $problem->{state} eq 'confirmed' && $problem->{duration} > 8*7*24*60*60) { @@ -1024,7 +1029,7 @@ sub display_problem { my $contact_url = Cobrand::url($cobrand, NewURL($q, -retain => 1, pc => undef, x => undef, 'y' => undef, -url=>'/contact?id=' . $input{id}), $q); my $back = Cobrand::url($cobrand, NewURL($q, -url => '/', - lat => $problem->{latitude}, lon => $problem->{longitude}, + lat => $short_lat, lon => $short_lon, -retain => 1, pc => undef, x => undef, 'y' => undef, id => undef ), $q); my $fixed = ($input{fixed}) ? ' checked' : ''; |