blob: 99797f9c9cb1a06b5a4e3388ca17ff753f965fc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package FixMyStreet::Cobrand::LichfieldDC;
use base 'FixMyStreet::Cobrand::UKCouncils';
use strict;
use warnings;
sub council_id { return 2434; }
sub council_area { return 'Lichfield district'; }
sub council_name { return 'Lichfield District Council'; }
sub council_url { return 'lichfielddc'; }
# Different to councils parent due to this being a two-tier council. If we get
# more, this can be genericised in the parent.
sub problems_clause {
return { bodies_str => { like => '%2434%' } };
}
# 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.584891, -1.963232, 52.807793, -1.586291 ],
};
}
# If we ever link to a county problem report, needs to be to main FixMyStreet
sub base_url_for_report {
my ( $self, $report ) = @_;
my $bodies = $report->bodies;
my %areas = map { %{$_->areas} } values %$bodies;
if ( $areas{2434} ) {
return $self->base_url;
} else {
return FixMyStreet->config('BASE_URL');
}
}
sub map_type {
return 'OSM';
}
1;
|