NAME
Geo::Coder::Ovi - Geocode addresses with the Ovi Maps API
SYNOPSIS
use Geo::Coder::Ovi;
my $geocoder = Geo::Coder::Ovi->new;
my $location = $geocoder->geocode(
location => 'Hollywood and Highland, Los Angeles, CA'
);
DESCRIPTION
The Geo::Coder::Ovi
module provides an interface to the geocoding service of the Ovi Maps API.
METHODS
new
$geocoder = Geo::Coder::Ovi->new();
Creates a new geocoding object.
Accepts an optional ua parameter for passing in a custom LWP::UserAgent object.
geocode
$location = $geocoder->geocode(location => $location)
@locations = $geocoder->geocode(location => $location)
Accepts an optional language parameter to specify the preferred language of the response. The language code is composed of the two-letter ISO-639 abbreviation and an optional two-letter ISO-3166 country code. Example values: 'en', 'en-US'.
In scalar context, this method returns the first location result; and in list context it returns all location results.
Each location result is a hashref; a typical example looks like:
{
categories => [ { id => 9000284 } ],
properties => {
addrAreaotherName => "West Harrison",
addrCityName => "Harrison",
addrCountryCode => "USA",
addrCountryName => "United States of America",
addrCountyName => "Westchester",
addrHouseAlpha => "",
addrHouseNumber => 102,
addrPopulation => 0,
addrPostalCode => 10604,
addrStateName => "New York",
addrStreetName => "Corporate Park Dr",
geoLatitude => "41.01945027709007",
geoLongitude => "-73.72334106825292",
language => "ENG",
title =>
"102 Corporate Park Dr, Harrison NY 10604, United States of America",
type => "Street",
},
}
response
$response = $geocoder->response()
Returns an HTTP::Response object for the last submitted request. Can be used to determine the details of an error.
ua
$ua = $geocoder->ua()
$ua = $geocoder->ua($ua)
Accessor for the UserAgent object.
SEE ALSO
REQUESTS AND BUGS
Please report any bugs or feature requests to http://rt.cpan.org/Public/Bug/Report.html?Queue=Geo-Coder-Ovi. 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::Ovi
You can also look for information at:
GitHub Source Repository
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
http://rt.cpan.org/Public/Dist/Display.html?Name=Geo-Coder-Ovi
Search CPAN
COPYRIGHT AND LICENSE
Copyright (C) 2010-2011 gray <gray at cpan.org>, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
gray, <gray at cpan.org>