aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm12
-rw-r--r--perllib/FixMyStreet/Geocode.pm2
2 files changed, 11 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index 026a56feb..21c7d31d6 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -31,10 +31,18 @@ sub site_name {
}
sub disambiguate_location {
- my $self = shift;
+ my $self = shift;
+ my $string = shift;
+
+ my $town = 'Bromley';
+ # Bing turns High St Bromley into Bromley High St which is in
+ # Bromley by Bow.
+ if ( $string =~ /high\+st/i ) {
+ $town .= ', BR1';
+ }
return {
%{ $self->SUPER::disambiguate_location() },
- town => 'Bromley',
+ town => $town,
centre => '51.366836,0.040623',
span => '0.154963,0.24347',
bounds => [ 51.289355, -0.081112, 51.444318, 0.162358 ],
diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm
index f2bc1ac95..f92e9cc9a 100644
--- a/perllib/FixMyStreet/Geocode.pm
+++ b/perllib/FixMyStreet/Geocode.pm
@@ -38,7 +38,7 @@ sub string {
$s =~ s/\s+/ /g;
$s = URI::Escape::uri_escape_utf8($s);
$s =~ s/%20/+/g;
- my $params = $c->cobrand->disambiguate_location();
+ my $params = $c->cobrand->disambiguate_location($s);
return FixMyStreet::Geocode::Bing::string($s, $c, $params)
if FixMyStreet->config('BING_MAPS_API_KEY');
# Fall back to Google API, which allow access with and without a key