root/lang/perl/HTTP-MobileAgent-Plugin-Locator/trunk/lib/HTTP/MobileAgent/Plugin/Locator/EZweb/BasicLocation.pm @ 4616

Revision 4616, 0.6 kB (checked in by clouder, 6 years ago)

lang/perl/HTTP-MobileAgent?-Plugin-Locator: minor adjustment for release to CPAN

Line 
1package HTTP::MobileAgent::Plugin::Locator::EZweb::BasicLocation;
2# Simple Location Information
3
4use strict;
5use base qw( HTTP::MobileAgent::Plugin::Locator );
6use Geo::Coordinates::Converter;
7
8sub get_location {
9    my ( $self, $params ) = @_;
10    my $lat = $params->{ lat };
11    my $lng = $params->{ lon };
12    my $datum = $params->{ datum } || 'wgs84';
13    my $format = $params->{ unit } || 'dms';
14    return Geo::Coordinates::Converter->new(
15        lat    => $lat,
16        lng    => $lng,
17        datum  => $datum,
18        format => $format,
19    )->convert;
20}
21
221;
Note: See TracBrowser for help on using the browser.