From 0e83d3541eece4481bd6ad66eaffd9e6625d8137 Mon Sep 17 00:00:00 2001 From: Guillaume RISCHARD Date: Thu, 22 Mar 2012 12:06:05 +0100 Subject: International support for Bing geocoding --- perllib/FixMyStreet/Cobrand/Default.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'perllib/FixMyStreet/Cobrand/Default.pm') diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index aacfb5e2b..a99bec65e 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -239,6 +239,8 @@ Returns disambiguating information available sub disambiguate_location { return { country => 'uk', + bing_culture => 'en-GB', + bing_country => 'United Kingdom' }; } -- cgit v1.2.3 From 2510c64411a437f293dcaf36086618660db5d860 Mon Sep 17 00:00:00 2001 From: Guillaume RISCHARD Date: Thu, 22 Mar 2012 13:16:06 +0100 Subject: Reverse bing geocoding should get the local culture parameter --- perllib/FixMyStreet/Cobrand/Default.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perllib/FixMyStreet/Cobrand/Default.pm') diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index a99bec65e..a4b7cecf2 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -459,7 +459,7 @@ sub find_closest { my ( $self, $latitude, $longitude, $problem ) = @_; my $str = ''; - if ( my $j = FixMyStreet::Geocode::Bing::reverse( $latitude, $longitude ) ) { + if ( my $j = FixMyStreet::Geocode::Bing::reverse( $latitude, $longitude, disambiguate_location()->{bing_culture} ) ) { # cache the bing results for use in alerts if ( $problem ) { $problem->geocode( $j ); @@ -506,7 +506,7 @@ sub find_closest_address_for_rss { # if we've not cached it then we don't want to look it up in order to avoid # hammering the bing api # if ( !$j ) { - # $j = FixMyStreet::Geocode::Bing::reverse( $latitude, $longitude, 1 ); + # $j = FixMyStreet::Geocode::Bing::reverse( $latitude, $longitude, disambiguate_location()->{bing_culture}, 1 ); # $problem->geocode( $j ); # $problem->update; -- cgit v1.2.3 From 8ce92aa814d69fbdb221483450b95ca2d9267bce Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 22 Mar 2012 17:29:49 +0000 Subject: Cobrand specific example front page placeholder, start of layout tweaks, fix geocoding. --- perllib/FixMyStreet/Cobrand/Default.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'perllib/FixMyStreet/Cobrand/Default.pm') diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index a4b7cecf2..c45c36b0b 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -916,5 +916,9 @@ Get stats to display on the council reports page sub get_report_stats { return 0; } +sub example_places { + return [ 'B2 4QA', 'Tib St, Manchester' ]; +} + 1; -- cgit v1.2.3