Filewatcher File Search File Search
Content Search
» » » » » » perl-Geo-Coder-Google-0.05-1.el5.rf.noarch.rpm » Content »
pkg://perl-Geo-Coder-Google-0.05-1.el5.rf.noarch.rpm:10805/usr/share/man/man3/  info  HEADER  downloads

perl-Geo-Coder-Google - Google Maps Geocoding API…  more info»


Geo::Coder::GooglUser Contributed Perl DocumentGeo::Coder::Google(3)

       Geo::Coder::Google - Google Maps Geocoding API

         use Geo::Coder::Google;

         my $geocoder = Geo::Coder::Google->new(apikey => 'Your API Key');
         my $location = $geocoder->geocode( location => 'Hollywood and Highland, Los Angeles, CA' );

       Geo::Coder::Google provides a geocoding functionality using
       Google Maps API.

             $geocoder = Geo::Coder::Google->new(apikey => 'Your API Key');
             $geocoder = Geo::Coder::Google->new(apikey => 'Your API Key', host => '');
             $geocoder = Geo::Coder::Google->new(apikey => 'Your API Key', language => 'ru');
             $geocoder = Geo::Coder::Google->new(apikey => 'Your API Key', gl => 'ca');

           Creates a new geocoding object. You should pass a valid
           Google Maps API Key as "apikey" parameter.

           When you'd like to query Japanese address, you might want
           to set host parameter, which should point to
  I think this also applies to other
           countries like UK (, but so far I only
           tested with .com and

           To specify the language of Google's response add "lan‐
           guage" parameter with a two-letter value. Note that
           adding that parameter does not guarantee that every
           request returns translated data.

           You can also set "gl" parameter to set country code (e.g.
           ca for Canada).

             $location = $geocoder->geocode(location => $location);
             @location = $geocoder->geocode(location => $location);

           Queries $location to Google Maps geocoding API and
           returns hash refernece returned back from API server.
           When you cann the method in an array context, it returns
           all the candidates got back, while it returns the 1st one
           in a scalar context.

           When you'd like to pass non-ascii string as a location,
           you should pass it as either UTF-8 bytes or Unicode
           flagged string.

           Returned data structure is as follows:

               'AddressDetails' => {
                 'Country' => {
                   'AdministrativeArea' => {
                     'SubAdministrativeArea' => {
                       'SubAdministrativeAreaName' => 'San Francisco',
                       'Locality' => {
                         'PostalCode' => {
                           'PostalCodeNumber' => '94107'
                         'LocalityName' => 'San Francisco',
                         'Thoroughfare' => {
                           'ThoroughfareName' => '548 4th St'
                     'AdministrativeAreaName' => 'CA'
                   'CountryNameCode' => 'US'
               'address' => '548 4th St, San Francisco, CA 94107, USA',
               'Point' => {
                 'coordinates' => [

       ua  Accessor method to get and set UserAgent object used
           internally. You can call env_proxy for example, to get
           the proxy information from environment variables:


           You can also set your own User-Agent object:

             $coder->ua( LWPx::ParanoidAgent->new );

       Tatsuhiko Miyagawa <>

       This library is free software; you can redistribute it and/or
       modify it under the same terms as Perl itself.

       Geo::Coder::Yahoo, <‐

       List of supported languages: <http://spread‐>

perl v5.8.8                  2009-03-20        Geo::Coder::Google(3)
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017