Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Geo::Coder::Ovi(3)    User Contributed Perl Documentation   Geo::Coder::Ovi(3)

NAME
       Geo::Coder::Ovi - Geocode addresses with	the Ovi	Maps API

SYNOPSIS
	   use Geo::Coder::Ovi;

	   my $geocoder	= Geo::Coder::Ovi->new(
	       appid =>	'Your App ID',
	       token =>	'Your token',
	   );
	   my $location	= $geocoder->geocode(
	       location	=> '102	Corporate Park Dr, Harrison, NY'
	   );

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(
	       appid =>	'Your App ID',
	       token =>	'Your token',
	       # debug => 1,
	   )

       Creates a new geocoding object.

       Accepts the following named arguments:

       o   appid

       o   token

	   Authentication credentials. (optional, for now)

	   Credentials can be obtained here:
	   <https://api.developer.nokia.com/ovi-api>

	   Note: performance and/or access may be limited without credentials.

       o   compress

	   Enable compression. (default: 1, unless debug is enabled)

       o   debug

	   Enable debugging. This prints the headers and content for requests
	   and responses. (default: 0)

       o   ua

	   A custom LWP::UserAgent object. (optional)

   geocode
	   $location = $geocoder->geocode(location => $location)
	   @locations =	$geocoder->geocode(location => $location)

       Accepts the following named arguments:

       o   location

	   The free-form, single line address to be located. (required)

       o   language

	   The preferred language of the response. The language	may be
	   specified as	the ISO639-1 language code (e.g. "en") or the language
	   code	and the	ISO3166-1 alpha-2 country code (e.g. "en-US").
	   (default: '')

       o   raw

	   Returns the raw data	structure converted from the response, not
	   split into location results.	(optional)

       In scalar context, this method returns the first	location result; and
       in list context it returns all location results.

       Example of the data structure representing a location result:

	   {
	       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",
	       },
	   }

       Example of the data structure returned using the	raw option:

	   {
	       id      => "mbc04bl15:20110629151643842:0000049",
	       results => [ $location ],
	       version => "1.0",
	   }

   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
       <http://api.maps.ovi.com/>

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:

       o   GitHub Source Repository

	   <http://github.com/gray/geo-coder-ovi>

       o   AnnoCPAN: Annotated CPAN documentation

	   <http://annocpan.org/dist/Geo-Coder-Ovi>

       o   CPAN	Ratings

	   <http://cpanratings.perl.org/d/Geo-Coder-Ovi>

       o   RT: CPAN's request tracker

	   <http://rt.cpan.org/Public/Dist/Display.html?Name=Geo-Coder-Ovi>

       o   Search CPAN

	   <http://search.cpan.org/dist/Geo-Coder-Ovi/>

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>

perl v5.24.1			  2011-11-04		    Geo::Coder::Ovi(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | SEE ALSO | REQUESTS AND BUGS | SUPPORT | COPYRIGHT AND LICENSE | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Geo::Coder::Ovi&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help