line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAttribute::Plugin::Locator::DoCoMo::GPS; |
2
|
|
|
|
|
|
|
# GPS |
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
5
|
1
|
|
|
1
|
|
5
|
use base qw( HTTP::MobileAttribute::Plugin::Locator::Base ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
577
|
|
6
|
1
|
|
|
1
|
|
5
|
use Geo::Coordinates::Converter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub get_location { |
9
|
4
|
|
|
4
|
0
|
8
|
my ( $self, $params ) = @_; |
10
|
4
|
|
|
|
|
8
|
my $lat = $params->{ lat }; |
11
|
4
|
|
|
|
|
8
|
my $lng = $params->{ lon }; |
12
|
4
|
|
|
|
|
6
|
my $datum = $params->{ geo }; |
13
|
4
|
|
|
|
|
28
|
return Geo::Coordinates::Converter->new( |
14
|
|
|
|
|
|
|
lat => $lat, |
15
|
|
|
|
|
|
|
lng => $lng, |
16
|
|
|
|
|
|
|
datum => lc $datum, |
17
|
|
|
|
|
|
|
)->convert( 'wgs84' ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |