Geo::Coder::GoogleMaps::Location - Geo::Coder::GoogleMaps' Location object
Version 0.12 (follow Geo::Coder::Google version number)
Here we have the object returned by Geo::Coder::GoogleMaps->geocode()
The constructor can take the following arguments :
- SubAdministrativeAreaName : a string - PostalCodeNumber : a postal code (err...) - LocalityName : yes! A locality name ! - ThoroughfareName: same thing => a string - AdministrativeAreaName - CountryNameCode - address - longitude - latitude - altitude (warning in Google Map API altitude must be 0)
Access the SubAdministrativeAreaName parameter.
print $location->SubAdministrativeAreaName(); # retrieve the value $location->SubAdministrativeAreaName("Paris"); # set the value
Access the PostalCodeNumber parameter.
print $location->PostalCodeNumber(); # retrieve the value $location->PostalCodeNumber("75000"); # set the value
Access the ThoroughfareName parameter.
print $location->ThoroughfareName(); # retrieve the value $location->ThoroughfareName("1 Avenue des Champs Élysées"); # set the value
Access the LocalityName parameter.
print $location->LocalityName(); # retrieve the value $location->LocalityName("Paris"); # set the value
Access the AdministrativeAreaName parameter.
print $location->AdministrativeAreaName(); # retrieve the value $location->AdministrativeAreaName("PA"); # set the value
Access the CountryNameCode parameter.
print $location->CountryNameCode(); # retrieve the value $location->CountryNameCode("FR"); # set the value
Access the address parameter.
print $location->address(); # retrieve the value $location->address("1 Avenue des Champs Élysées, 75000, Paris, FR"); # set the value
Access the latitude parameter.
print $location->latitude(); # retrieve the value $location->latitude("-122.4558"); # set the value
Access the longitude parameter.
print $location->longitude(); # retrieve the value $location->longitude("55.23465"); # set the value
Access the altitude parameter.
print $location->altitude(); # retrieve the value $location->altitude(0); # set the value
Please note that it must be 0 if you use the Google Map API.
Return a JSON encoded object ( thanks to JSON::Syck::Dump() )
my $json = $location->toJSON ;
Return a KML object ( thanks to XML::LibXML ).
my $kml = $location->toXML ;
Please note that this function can take an optionnal argument (0 or 1) and if it's set to 1 this method return a XML string instead of the XML::LibXML::Document object.
An allias for toKML()
This method simply call the good to(JSON|XML|KML) depending of the output format you selected.
You can eventually pass extra arguments, they will be relayed.
$location->Serialyze(1); # if the output is set to XML or KML you will have a stringified XML as output
Arnaud DUPUIS, <a.dupuis at nabladev.com>
<a.dupuis at nabladev.com>
Please report any bugs or feature requests to bug-geo-coder-googlemaps at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geo-Coder-GoogleMaps. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-geo-coder-googlemaps at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Geo::Coder::GoogleMaps
You can also look for information at:
Nabla Development: http://www.nabladev.com and http://opensource.nabladev.com
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Geo-Coder-GoogleMaps
CPAN Ratings
http://cpanratings.perl.org/d/Geo-Coder-GoogleMaps
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Geo-Coder-GoogleMaps
Search CPAN
http://search.cpan.org/dist/Geo-Coder-GoogleMaps
Copyright 2007 Arnaud DUPUIS and Nabla Development, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Élysées");'. Assuming UTF-8
To install Geo::Coder::GoogleMaps, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Coder::GoogleMaps
CPAN shell
perl -MCPAN -e shell install Geo::Coder::GoogleMaps
For more information on module installation, please visit the detailed CPAN module installation guide.