aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-05-03 16:52:44 +0100
committerDave Arter <davea@mysociety.org>2019-06-04 14:54:52 +0100
commiteb1404d8f0c9407eb0836b006ef461d9b0b2eca7 (patch)
tree5db65884dab61a658d0ab1efd3616c2b756377c5
parent287c27dfd8dae99a4a0cc3b3deebca4252c5f7ae (diff)
[Hounslow] Use OSM geocoder
Bing wasn't showing enough detail on the disambiguation page.
-rw-r--r--perllib/FixMyStreet/Cobrand/Hounslow.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Hounslow.pm b/perllib/FixMyStreet/Cobrand/Hounslow.pm
index d60b67a88..7ebd62a18 100644
--- a/perllib/FixMyStreet/Cobrand/Hounslow.pm
+++ b/perllib/FixMyStreet/Cobrand/Hounslow.pm
@@ -29,13 +29,27 @@ sub disambiguate_location {
my $self = shift;
my $string = shift;
+ my $town = "Hounslow";
+
+ # Some specific Hounslow roads produce lots of geocoder results
+ # for the same road; this picks just one.
+ ( $string, $town ) = ( "TW3 4HR", "" ) if $string =~ /lampton\s+road/i;
+ ( $string, $town ) = ( "TW3 4AJ", "" ) if $string =~ /kingsley\s+road/i;
+ ( $string, $town ) = ( "TW3 1YQ", "" ) if $string =~ /stanborough\s+road/i;
+
return {
%{ $self->SUPER::disambiguate_location() },
+ string => $string,
centre => '51.468495,-0.366134',
+ town => $town,
bounds => [ 51.420739, -0.461502, 51.502850, -0.243443 ],
};
}
+sub get_geocoder {
+ return 'OSM'; # default of Bing gives poor results, let's try overriding.
+}
+
sub on_map_default_status { 'open' }
sub contact_email {