aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map/UKCouncilWMTS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Map/UKCouncilWMTS.pm')
-rw-r--r--perllib/FixMyStreet/Map/UKCouncilWMTS.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Map/UKCouncilWMTS.pm b/perllib/FixMyStreet/Map/UKCouncilWMTS.pm
index da0720f06..aba6d3840 100644
--- a/perllib/FixMyStreet/Map/UKCouncilWMTS.pm
+++ b/perllib/FixMyStreet/Map/UKCouncilWMTS.pm
@@ -36,6 +36,8 @@ sub tile_parameters {
# Reproject a WGS84 lat/lon into BNG easting/northing
sub reproject_from_latlon($$$) {
my ($self, $lat, $lon) = @_;
+ # do not try to reproject if we have no co-ordindates as convert breaks
+ return (0.0, 0.0) if $lat == 0 && $lon == 0;
my ($x, $y) = Utils::convert_latlon_to_en($lat, $lon);
return ($x, $y);
}