Changeset 2652 for lang/perl/HTTP-MobileAgent-Plugin-Locator/trunk/lib/HTTP/MobileAgent/Plugin/Locator/SoftBank/BasicLocation.pm
- Timestamp:
- 12/06/07 18:55:16 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-MobileAgent-Plugin-Locator/trunk/lib/HTTP/MobileAgent/Plugin/Locator/SoftBank/BasicLocation.pm
r2437 r2652 1 1 package HTTP::MobileAgent::Plugin::Locator::SoftBank::BasicLocation; 2 # 簡易位置情報2 # Simple Location Information 3 3 4 4 use strict; 5 use base qw( HTTP::MobileAgent::Plugin::Locator::Base ); 5 use base qw( HTTP::MobileAgent::Plugin::Locator ); 6 use Geo::Coordinates::Converter; 6 7 7 8 sub get_location { 8 my ( $self, $page ) = @_;9 my $self = shift; 9 10 my $geocode = $ENV{ HTTP_X_JPHONE_GEOCODE }; 10 11 $geocode =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; 11 12 my ( $lat, $lng, $address ) = split /\x1a/, $geocode; 12 return +{ 13 lat => _convert_point( $lat ) || undef, 14 lng => _convert_point( $lng ) || undef, 15 }; 13 return Geo::Coordinates::Converter->new( 14 lat => _convert_point( $lat ) || undef, 15 lng => _convert_point( $lng ) || undef, 16 datum => 'tokyo', 17 )->convert( 'wgs84' ); 16 18 } 17 19
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)