line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAgent::Plugin::Locator::SoftBank::GPS; |
2
|
|
|
|
|
|
|
# S!GPS |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
5
|
1
|
|
|
1
|
|
4
|
use base qw( HTTP::MobileAgent::Plugin::Locator ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
85
|
|
6
|
1
|
|
|
1
|
|
5
|
use Geo::Coordinates::Converter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub get_location { |
9
|
4
|
|
|
4
|
1
|
6
|
my ( $self, $params ) = @_; |
10
|
4
|
|
|
|
|
22
|
my ( $lat, $lng ) = $params->{ pos } =~ /^[NS]([\d\.]+)[EW]([\d\.]+)$/; |
11
|
4
|
|
50
|
|
|
19
|
my $datum = $params->{ geo } || 'wgs84'; |
12
|
4
|
|
|
|
|
15
|
return Geo::Coordinates::Converter->new( |
13
|
|
|
|
|
|
|
lat => $lat, |
14
|
|
|
|
|
|
|
lng => $lng, |
15
|
|
|
|
|
|
|
datum => $datum, |
16
|
|
|
|
|
|
|
)->convert; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |