aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-03-22 13:13:26 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-03-22 13:13:26 +0000
commite2cc014a4dc1728d78cbf8e076f1a15645d1e6e7 (patch)
tree2b391bcef8f1d01de647c1d54e9de8536dd6600c /perllib/FixMyStreet
parent5268a7dd4fb783e6b3f7b5387aa0b99708157b65 (diff)
Initial creation of Bromley cobrand.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm29
-rw-r--r--perllib/FixMyStreet/Cobrand/Reading.pm6
-rw-r--r--perllib/FixMyStreet/Geocode/Bing.pm2
3 files changed, 33 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
new file mode 100644
index 000000000..4caeb16b6
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -0,0 +1,29 @@
+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 {
+ return {
+ centre => '51.366836,0.040623',
+ span => '0.154963,0.24347',
+ bounds => [ '51.289355,-0.081112', '51.444318,0.162358' ],
+ };
+}
+
+1;
+
diff --git a/perllib/FixMyStreet/Cobrand/Reading.pm b/perllib/FixMyStreet/Cobrand/Reading.pm
index afc2b6ac6..58d96c5ca 100644
--- a/perllib/FixMyStreet/Cobrand/Reading.pm
+++ b/perllib/FixMyStreet/Cobrand/Reading.pm
@@ -14,9 +14,9 @@ sub council_url { return 'reading'; }
sub disambiguate_location {
return {
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/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm
index 70275c2c7..f00cf9671 100644
--- a/perllib/FixMyStreet/Geocode/Bing.pm
+++ b/perllib/FixMyStreet/Geocode/Bing.pm
@@ -24,7 +24,7 @@ sub string {
my ( $s, $c, $params ) = @_;
$s .= '+' . $params->{town} if $params->{town} and $s !~ /$params->{town}/i;
my $url = "http://dev.virtualearth.net/REST/v1/Locations?q=$s";
- $url .= '&mapView=' . $params->{bounds}[0] . ',' . $params->{bounds}[1]
+ $url .= '&userMapView=' . $params->{bounds}[0] . ',' . $params->{bounds}[1]
if $params->{bounds};
$url .= '&userLocation=' . $params->{centre} if $params->{centre};
$url .= '&c=' . $params->{bing_culture} if $params->{bing_culture};