diff options
author | Struan Donald <struan@exo.org.uk> | 2011-05-05 11:26:24 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-05-05 11:26:24 +0100 |
commit | d98932ca12742253938a9dcad8c36c4cbd227db7 (patch) | |
tree | cb94541be7d8104c56bbb60bfbf9f0a7b75e1c5e | |
parent | 67802ddb9b61d9831b01bdd26c8a9b0e6fab41c8 (diff) |
get co-ords from request or postcode
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index 596aeff76..ffe3c705c 100644 --- a/perllib/FixMyStreet/App/Controller/Alert.pm +++ b/perllib/FixMyStreet/App/Controller/Alert.pm @@ -71,20 +71,15 @@ sub list :Path('list') :Args(0) { # my %input = map { $_ => scalar $q->param($_) } @vars; # my %input_h = map { $_ => $q->param($_) ? ent($q->param($_)) : '' } @vars; # -# my($error, $lat, $lon); -# if ($input{lat} || $input{lon}) { -# $lat = $input{lat}; -# $lon = $input{lon}; -# } else { -# try { -# ($lat, $lon, $error) = FixMyStreet::Geocode::lookup($input{pc}, $q); -# } catch Error::Simple with { -# $error = shift; -# }; -# } -# + # Try to create a location for whatever we have + unless ($c->forward('/around/determine_location_from_coords') + || $c->forward('/around/determine_location_from_pc') ) { + # FIXME: do error display here # return FixMyStreet::Geocode::list_choices($error, '/alert', $q) if ref($error) eq 'ARRAY'; # return alert_front_page($q, $error) if $error; + } + + $c->log->debug( $_ ) for ( $c->stash->{pc}, $c->stash->{latitude}, $c->stash->{longitude} ); $c->forward('prettify_pc'); |