oder::Google::V3;
use strict;
use warnings;
our $VERSION = '0.11_02';
use Carp;
use Encode;
use JSON;
use HTTP::Request;
use LWP::UserAgent;
use URI;
sub new {
my($class, %param) = @_;
my
ode::encode_utf8($location);
}
my $uri = URI->new("http://$self->{host}/maps/api/geocode/json");
my %query_parameters = (address => $location);
$query_parameters{language} = $self->{l
croak("Google Maps API returned error: " . $res->status_line);
}
my $json = JSON->new->utf8;
my $data = $json->decode($res->content);
if ($data->{status} eq 'OVER_QUERY_LIMIT') {
oder::Google::V2;
use strict;
use warnings;
our $VERSION = '0.11_02';
use Carp;
use Encode;
use JSON;
use HTTP::Request;
use LWP::UserAgent;
use URI;
sub new {
my($class, %param) = @_;
my
URI->new("http://$self->{host}/maps/geo");
my %query_parameters = (q => $location, output => 'json');
$query_parameters{hl} = $self->{language} if defined $self->{language};
$query_paramet
croak("Google Maps API returned error: " . $res->status_line);
}
my $json = JSON->new->utf8;
my $data = $json->decode($res->content);
my @placemark = @{ $data->{Placemark} || [] };