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