root/lang/perl/HTTP-MobileAgent-Plugin-Locator/trunk/lib/HTTP/MobileAgent/Plugin/Locator/DoCoMo/GPS.pm @ 2652

Revision 2652, 466 bytes (checked in by clouder, 5 years ago)

lang/perl/HTTP-MobileAgent?-Plugin-Locator: modifiled to apply Apache::Request and CGI instance, and return G::C::C::Point instance

Line 
1package HTTP::MobileAgent::Plugin::Locator::DoCoMo::GPS;
2# GPS
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->{ geo };
13    return Geo::Coordinates::Converter->new(
14        lat   => $lat,
15        lng   => $lng,
16        datum => lc $datum,
17    )->convert( 'wgs84' );
18}
19
201;
Note: See TracBrowser for help on using the browser.