diff options
author | Edmund von der Burg <evdb@ecclestoad.co.uk> | 2011-02-08 11:14:26 -0300 |
---|---|---|
committer | Edmund von der Burg <evdb@ecclestoad.co.uk> | 2011-02-08 11:14:26 -0300 |
commit | 7cf46ee96e224095a7f2adb925f2b4ff16eb63e7 (patch) | |
tree | 11825d002e2b4e3021a836b2c03ef699df1ec95b /web/index.cgi | |
parent | 98e6f22852e469873fa05f9d8dca25b0d170edc7 (diff) |
convert various map functions
Diffstat (limited to 'web/index.cgi')
-rwxr-xr-x | web/index.cgi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/index.cgi b/web/index.cgi index 64434a68f..5228b7e3f 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -307,7 +307,7 @@ sub submit_problem { return display_form($q, \@errors, \%field_errors) if (@errors || scalar keys %field_errors); # Short circuit my $areas; - if ($input{easting} && $input{northing}) { + if (defined $input{lat} && defined $input{lon}) { $areas = mySociety::MaPit::call('point', "27700/$input{easting},$input{northing}"); if ($input{council} =~ /^[\d,]+(\|[\d,]+)?$/) { my $no_details = $1 || ''; @@ -347,7 +347,7 @@ sub submit_problem { $input{council} = join(',', @valid_councils) . $no_details; } $areas = ',' . join(',', sort keys %$areas) . ','; - } elsif ($input{easting} || $input{northing}) { + } elsif (defined $input{lat} || defined $input{lon}) { push(@errors, _('Somehow, you only have one co-ordinate. Please try again.')); } else { push(@errors, _('You haven\'t specified any sort of co-ordinates. Please try again.')); @@ -812,7 +812,7 @@ sub display_location { $interval = '6 months'; } - my ($on_map_all, $on_map, $around_map, $dist) = FixMyStreet::Map::map_features($q, $easting, $northing, $interval); + my ($on_map_all, $on_map, $around_map, $dist) = FixMyStreet::Map::map_features_easting_northing($q, $easting, $northing, $interval); my @pins; foreach (@$on_map_all) { push @pins, [ $_->{easting}, $_->{northing}, $_->{state} eq 'fixed' ? 'green' : 'red' ]; |