line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAttribute::Plugin::Locator::DoCoMo::BasicLocation; |
2
|
|
|
|
|
|
|
# Open iArea |
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
5
|
1
|
|
|
1
|
|
6
|
use base qw( HTTP::MobileAttribute::Plugin::Locator::Base ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
104
|
|
6
|
1
|
|
|
1
|
|
6
|
use Geo::Coordinates::Converter; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
9
|
|
7
|
1
|
|
|
1
|
|
21
|
use Geo::Coordinates::Converter::iArea; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub get_location { |
10
|
12
|
|
|
12
|
0
|
20
|
my ( $self, $params ) = @_; |
11
|
|
|
|
|
|
|
|
12
|
12
|
100
|
66
|
|
|
71
|
if ($params->{LAT} && $params->{LON} && $params->{GEO}) { |
|
|
|
66
|
|
|
|
|
13
|
6
|
|
|
|
|
31
|
return Geo::Coordinates::Converter->new( |
14
|
|
|
|
|
|
|
lat => $params->{LAT}, |
15
|
|
|
|
|
|
|
lng => $params->{LON}, |
16
|
|
|
|
|
|
|
datum => $params->{GEO}, |
17
|
|
|
|
|
|
|
)->convert; |
18
|
|
|
|
|
|
|
} else { |
19
|
6
|
|
|
|
|
41
|
return Geo::Coordinates::Converter::iArea->get_center( |
20
|
|
|
|
|
|
|
$params->{AREACODE} |
21
|
|
|
|
|
|
|
)->convert( 'wgs84', 'dms' ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |