aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Geocode/Google.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-03-21 12:42:50 +0000
committerDave Arter <davea@mysociety.org>2018-04-10 10:42:34 +0100
commitf42de3bbb2e04614724cb8299e4fa9c8581b34b6 (patch)
tree7c4541b13bf095e28c9d647ae219347bc49fbdcc /perllib/FixMyStreet/Geocode/Google.pm
parentf2b92da63ac147d18847396d9fb3d82231d73158 (diff)
Geocoders: allow cobrands to fixup user's search string
This is useful, for example, if the cobrand has a list of common typos that you want to account for.
Diffstat (limited to 'perllib/FixMyStreet/Geocode/Google.pm')
-rw-r--r--perllib/FixMyStreet/Geocode/Google.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Geocode/Google.pm b/perllib/FixMyStreet/Geocode/Google.pm
index 162101953..ad1881541 100644
--- a/perllib/FixMyStreet/Geocode/Google.pm
+++ b/perllib/FixMyStreet/Geocode/Google.pm
@@ -19,6 +19,8 @@ sub string {
my ( $s, $c ) = @_;
my $params = $c->cobrand->disambiguate_location($s);
+ # Allow cobrand to fixup the user input
+ $s = $params->{string} if $params->{string};
my $components = "";