The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Geo::Coder::GoogleMaps::Location - Geo::Coder::GoogleMaps' Location object

VERSION

Version 0.12 (follow Geo::Coder::Google version number)

SYNOPSIS

Here we have the object returned by Geo::Coder::GoogleMaps->geocode()

FUNCTIONS

new

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)

SubAdministrativeAreaName

Access the SubAdministrativeAreaName parameter.

        print $location->SubAdministrativeAreaName(); # retrieve the value
        $location->SubAdministrativeAreaName("Paris"); # set the value

PostalCodeNumber

Access the PostalCodeNumber parameter.

        print $location->PostalCodeNumber(); # retrieve the value
        $location->PostalCodeNumber("75000"); # set the value

ThoroughfareName

Access the ThoroughfareName parameter.

        print $location->ThoroughfareName(); # retrieve the value
        $location->ThoroughfareName("1 Avenue des Champs Élysées"); # set the value

LocalityName

Access the LocalityName parameter.

        print $location->LocalityName(); # retrieve the value
        $location->LocalityName("Paris"); # set the value

AdministrativeAreaName

Access the AdministrativeAreaName parameter.

        print $location->AdministrativeAreaName(); # retrieve the value
        $location->AdministrativeAreaName("PA"); # set the value

CountryNameCode

Access the CountryNameCode parameter.

        print $location->CountryNameCode(); # retrieve the value
        $location->CountryNameCode("FR"); # set the value

address

Access the address parameter.

        print $location->address(); # retrieve the value
        $location->address("1 Avenue des Champs Élysées, 75000, Paris, FR"); # set the value

latitude

Access the latitude parameter.

        print $location->latitude(); # retrieve the value
        $location->latitude("-122.4558"); # set the value

longitude

Access the longitude parameter.

        print $location->longitude(); # retrieve the value
        $location->longitude("55.23465"); # set the value

altitude

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.

toJSON

Return a JSON encoded object ( thanks to JSON::Syck::Dump() )

        my $json = $location->toJSON ;

toKML

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.

toXML

An allias for toKML()

Serialyze

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

AUTHOR

Arnaud DUPUIS, <a.dupuis at nabladev.com>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Geo::Coder::GoogleMaps

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

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:

Around line 112:

Non-ASCII character seen before =encoding in 'Élysées");'. Assuming UTF-8