package Geo::Coder::GoogleMaps;
use warnings;
use strict;
use Carp;
use Encode;
use JSON::Syck;
use HTTP::Request;
use LWP::UserAgent;
use URI;
use XML::LibXML ;
use Geo::Coder::GoogleMaps::Location;
miyagawa/>).
In fact it's a fork of Mr Miyagawa's module. Geo::Coder::GoogleMaps use the default JSON data type as default output but also support XML/KML.
The direct output of the geocode() method
is: maps.google.com)
output : the output method between xml, kml and json (csv support plan for futur release). Default is json.
Example:
my $gmap = Geo::Coder::GoogleMaps->new( apikey => 'abcdef
package Geo::Coder::GoogleMaps::Location ;
use strict;
use warnings;
use strict;
use Carp;
use JSON::Syck;
use XML::LibXML;
our $VERSION='0.4';
=encoding utf-8
=head1 NAME
Geo::Coder::GoogleMaps:
e'} || '',
delete $param{'altitude'} || 0
]
}
};
my $out = delete $param{'output'} || 'json';
bless { data => $obj, output => $out }, $class;
}
=head2 SubAdministrativeAreaName
Access th
>{'west'} ;
}
=head2 toJSON
Return a JSON encoded object ( thanks to JSON::Syck::Dump() )
my $json = $location->toJSON ;
=cut
sub toJSON {
my $self = shift;
return JSON::Syck::Dump($self->{'da