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

FreeBSD Manual Pages

  
 
  

home | help
Geo::Coder::TomTom(3) User Contributed Perl DocumentationGeo::Coder::TomTom(3)

NAME
       Geo::Coder::TomTom - Geocode addresses with the TomTom Map Toolkit API

SYNOPSIS
	   use Geo::Coder::TomTom;

	   my $geocoder	= Geo::Coder::TomTom->new(apikey => 'Your API key');
	   my $location	= $geocoder->geocode(
	       location	=> 'De Ruijterkade 154,	Amsterdam, NL'
	   );

DESCRIPTION
       The "Geo::Coder::TomTom"	module provides	an interface to	the TomTom Map
       Toolkit geocoding service.

METHODS
   new
	   $geocoder = Geo::Coder::TomTom->new('Your API key')
	   $geocoder = Geo::Coder::TomTom->new(
	       apikey => 'Your API key',
	       # debug => 1,
	   )

       Creates a new geocoding object.

       Accepts the following named arguments:

       o   apikey

	   An API key (required)

	   An API key can be obtained here:
	   <http://developer.tomtom.com/apps/mykeys>

       o   ua

	   A custom LWP::UserAgent object. (optional)

       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)

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

       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:

	   {
	       "latitude": 52.3773852,
	       "longitude": 4.9094794,
	       "geohash": "u173zxnbrhm0",
	       "mapName": "TomTomMap",
	       "houseNumber": "154",
	       "type": "house",
	       "street": "De Ruijterkade",
	       "alternativeStreetName":	[],
	       "city": "Amsterdam",
	       "district": "Amsterdam",
	       "country": "The Netherlands",
	       "countryISO3": "NLD",
	       "postcode": "1011 AC",
	       "formattedAddress": "De Ruijterkade 154,	1011 AC	Amsterdam, Amsterdam, NL",
	       "isCensusMicropolitanFlag": false,
	       "widthMeters": 1,
	       "heightMeters": 1,
	       "score":	1.0,
	       "confidence": 0.40665394,
	       "iteration": 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://developer.tomtom.com/docs/read/map_toolkit/web_services/geocoding_single_call>

REQUESTS AND BUGS
       Please report any bugs or feature requests to
       <http://rt.cpan.org/Public/Bug/Report.html?Queue=Geo-Coder-TomTom>. 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::TomTom

       You can also look for information at:

       o   GitHub Source Repository

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

       o   AnnoCPAN: Annotated CPAN documentation

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

       o   CPAN	Ratings

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

       o   RT: CPAN's request tracker

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

       o   Search CPAN

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

COPYRIGHT AND LICENSE
       Copyright (C) 2010-2015 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			  2015-01-04		 Geo::Coder::TomTom(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::TomTom&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help