Geo::Coder::CA - Get data from http://geocoder.ca
Version 0.01
use Geo::Coder::CA; my $geocoder = Geo::Coder::CA->new(); my $location = $geocoder->geocode(location => '9235 Main St, Richibucto, New Brunswick, Canada');
Geo::Coder::CA provides an interface to geocoder.ca. Geo::Coder::Canada no longer seems to work.
$geocoder = Geo::Coder::CA->new(); my $ua = LWP::UserAgent->new(); $ua->env_proxy(1); $geocoder = Geo::Coder::CA->new(ua => $ua);
$location = $geocoder->geocode(location => $location); # @location = $geocoder->geocode(location => $location); print 'Latitude: ', $location->{'latt'}, "\n"; print 'Longitude: ', $location->{'longt'}, "\n";
Accessor method to get and set UserAgent object used internally. You can call env_proxy for example, to get the proxy information from environment variables:
$geocoder->ua()->env_proxy(1);
You can also set your own User-Agent object:
$geocoder->ua(LWPx::ParanoidAgent->new());
NOT YET WRITTEN
$location = $geocoder->reverse_geocode(latlng => '37.778907,-122.39732'); @location = $geocoder->reverse_geocode(latlng => '37.778907,-122.39732');
Similar to geocode except it expects a latitude/longitude parameter.
Nigel Horne <njh@bandsman.co.uk>
Based on Geo::Coder::Coder::Googleplaces.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Lots of thanks to the folks at geocoder.ca.
Geo::Coder::GooglePlaces, HTML::GoogleMaps::V3
Copyright 2017 Nigel Horne.
This program is released under the following licence: GPL2
To install Geo::Coder::CA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Coder::CA
CPAN shell
perl -MCPAN -e shell install Geo::Coder::CA
For more information on module installation, please visit the detailed CPAN module installation guide.