line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Imager::Bing::MapLayer::Role::Centroid; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
2758
|
use v5.10; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
150
|
|
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
17
|
use Moose::Role; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
30
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
15980
|
use Const::Fast; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
31
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Imager::Bing::MapLayer::Role::Centroid - a centroid role |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=cut |
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
3
|
|
241
|
use version 0.77; our $VERSION = version->declare('v0.1.9'); |
|
3
|
|
|
|
|
70
|
|
|
3
|
|
|
|
|
24
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
This role is for internal use by L<Imager::Bing::MapLayer>. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# We default to a centroid in London, because, this was originally |
24
|
|
|
|
|
|
|
# developed for a London-based company. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
const my $LONDON_LATITUDE => 51.5171; |
27
|
|
|
|
|
|
|
const my $LONDON_LONGITUDE => 0.1062; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has 'centroid_latitude' => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
isa => 'Num', |
32
|
|
|
|
|
|
|
builder => '_build_centroid_latitude', |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
has 'centroid_longitude' => ( |
36
|
|
|
|
|
|
|
is => 'ro', |
37
|
|
|
|
|
|
|
isa => 'Num', |
38
|
|
|
|
|
|
|
builder => '_build_centroid_longitude', |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
2
|
|
|
2
|
|
1084
|
sub _build_centroid_latitude {$LONDON_LATITUDE} |
42
|
2
|
|
|
2
|
|
1580
|
sub _build_centroid_longitude {$LONDON_LONGITUDE} |
43
|
|
|
|
|
|
|
|
44
|
3
|
|
|
3
|
|
594
|
use namespace::autoclean; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
30
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |