aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r--perllib/FixMyStreet/Cobrand/Barnet.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm35
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm10
-rw-r--r--perllib/FixMyStreet/Cobrand/LichfieldDC.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Reading.pm8
-rw-r--r--perllib/FixMyStreet/Cobrand/Southampton.pm2
6 files changed, 54 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm
index 9791b071a..6f115ec63 100644
--- a/perllib/FixMyStreet/Cobrand/Barnet.pm
+++ b/perllib/FixMyStreet/Cobrand/Barnet.pm
@@ -10,7 +10,9 @@ sub council_name { return 'Barnet Council'; }
sub council_url { return 'barnet'; }
sub disambiguate_location {
+ my $self = shift;
return {
+ %{ $self->SUPER::disambiguate_location() },
centre => '51.612832,-0.218169',
span => '0.0563,0.09',
bounds => [ '51.584682,-0.263169', '51.640982,-0.173169' ],
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
new file mode 100644
index 000000000..75174b638
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -0,0 +1,35 @@
+package FixMyStreet::Cobrand::Bromley;
+use base 'FixMyStreet::Cobrand::UKCouncils';
+
+use strict;
+use warnings;
+
+sub council_id { return 2482; }
+sub council_area { return 'Bromley'; }
+sub council_name { return 'Bromley Council'; }
+sub council_url { return 'bromley'; }
+
+sub path_to_web_templates {
+ my $self = shift;
+ return [
+ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
+ FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
+ ];
+}
+
+sub disambiguate_location {
+ my $self = shift;
+ return {
+ %{ $self->SUPER::disambiguate_location() },
+ centre => '51.366836,0.040623',
+ span => '0.154963,0.24347',
+ bounds => [ '51.289355,-0.081112', '51.444318,0.162358' ],
+ };
+}
+
+sub example_places {
+ return ( 'BR1 3UH', 'Glebe Rd, Bromley' );
+}
+
+1;
+
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index aacfb5e2b..c45c36b0b 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'
};
}
@@ -457,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 );
@@ -504,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;
@@ -914,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;
diff --git a/perllib/FixMyStreet/Cobrand/LichfieldDC.pm b/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
index 91c5e10ec..4d93aaf76 100644
--- a/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
+++ b/perllib/FixMyStreet/Cobrand/LichfieldDC.pm
@@ -21,7 +21,9 @@ sub problems_clause {
# FIXME - need to double check this is all correct
sub disambiguate_location {
+ my $self = shift;
return {
+ %{ $self->SUPER::disambiguate_location() },
centre => '52.688198,-1.804966',
span => '0.1196,0.218675',
bounds => [ '52.807793,-1.586291', '52.584891,-1.963232' ],
diff --git a/perllib/FixMyStreet/Cobrand/Reading.pm b/perllib/FixMyStreet/Cobrand/Reading.pm
index afc2b6ac6..c8591924e 100644
--- a/perllib/FixMyStreet/Cobrand/Reading.pm
+++ b/perllib/FixMyStreet/Cobrand/Reading.pm
@@ -12,11 +12,13 @@ sub council_name { return 'Reading City Council'; }
sub council_url { return 'reading'; }
sub disambiguate_location {
+ my $self = shift;
return {
+ %{ $self->SUPER::disambiguate_location() },
town => 'Reading',
- centre => '51.452983169803964,-0.98382678731985973',
- span => '0.0833543573028663,0.124500468843446',
- bounds => [ '51.409779668156361,-1.0529948144525243', '51.493134025459227,-0.92849434560907829' ],
+ centre => '51.452983,-0.983827',
+ span => '0.083355,0.1245',
+ bounds => [ '51.409779,-1.052994', '51.493134,-0.928494' ],
};
}
diff --git a/perllib/FixMyStreet/Cobrand/Southampton.pm b/perllib/FixMyStreet/Cobrand/Southampton.pm
index 5bb7df3b6..b57091bef 100644
--- a/perllib/FixMyStreet/Cobrand/Southampton.pm
+++ b/perllib/FixMyStreet/Cobrand/Southampton.pm
@@ -10,7 +10,9 @@ sub council_name { return 'Southampton City Council'; }
sub council_url { return 'southampton'; }
sub disambiguate_location {
+ my $self = shift;
return {
+ %{ $self->SUPER::disambiguate_location() },
town => 'Southampton',
centre => '50.913822,-1.400493',
span => '0.084628,0.15701',