line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAttribute::Plugin::Locator::EZweb::BasicLocation; |
2
|
|
|
|
|
|
|
# Simple Location Information |
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
5
|
use base qw( HTTP::MobileAttribute::Plugin::Locator::Base ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
85
|
|
6
|
1
|
|
|
1
|
|
5
|
use Geo::Coordinates::Converter; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub get_location { |
9
|
6
|
|
|
6
|
0
|
12
|
my ( $self, $params ) = @_; |
10
|
6
|
|
|
|
|
11
|
my $lat = $params->{ lat }; |
11
|
6
|
|
|
|
|
14
|
my $lng = $params->{ lon }; |
12
|
6
|
|
50
|
|
|
16
|
my $datum = $params->{ datum } || 'wgs84'; |
13
|
6
|
|
50
|
|
|
25
|
my $format = $params->{ unit } || 'dms'; |
14
|
6
|
|
|
|
|
28
|
return Geo::Coordinates::Converter->new( |
15
|
|
|
|
|
|
|
lat => $lat, |
16
|
|
|
|
|
|
|
lng => $lng, |
17
|
|
|
|
|
|
|
datum => $datum, |
18
|
|
|
|
|
|
|
format => $format, |
19
|
|
|
|
|
|
|
)->convert; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |