diff options
author | Matthew Somerville <matthew@balti.ukcod.org.uk> | 2010-11-23 15:55:17 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@balti.ukcod.org.uk> | 2010-11-23 16:54:56 +0000 |
commit | 8690e19d0fb7cc88f8e13a3f6cc46681c1ee95a4 (patch) | |
tree | 8d385abe7d09be04ffe6842ddffcba853840730e /web/rss.cgi | |
parent | d58a65d096223ec4e4cd09d734dc3e758a8484b3 (diff) |
Have FixMyStreet::Geocode only deal in real co-ordinates.
Diffstat (limited to 'web/rss.cgi')
-rwxr-xr-x | web/rss.cgi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/rss.cgi b/web/rss.cgi index 623314e7f..867f050fd 100755 --- a/web/rss.cgi +++ b/web/rss.cgi @@ -94,7 +94,13 @@ sub rss_local_problems { } elsif ($pc) { my $error; try { - ($x, $y, $e, $n, $error) = FixMyStreet::Geocode::lookup($pc, $q); + ($e, $n, $error) = FixMyStreet::Geocode::lookup($pc, $q); + my $xx = FixMyStreet::Map::os_to_tile($e);¬ + my $yy = FixMyStreet::Map::os_to_tile($n);¬ + $x = int($xx);¬ + $y = int($yy);¬ + $x += 1 if ($xx - $x > 0.5);¬ + $y += 1 if ($yy - $y > 0.5);¬ } catch Error::Simple with { $error = shift; }; |