NAME
WWW::MapBlast - latitude & longitude from postal codes.
SYNOPSIS
use WWW::MapBlast;
my ($lat, $lon) = WWW::MapBlast::latlon('United Kingdom','BN3 3AG');
__END__;
DESCRIPTION
Simply accesses MapBlast.com and retrieves latitude and longitude information.
Only minimal error checking, so have a look through the source before you use.
Commentary
Set $CHAT if you wish to see what's going on during net access.
Subroutine latlon (country, postcode)
Accepts a country name and a postal code, returns the relative latitude and longitude as defined by MapBlast.com
The argument country
must match a key of the module's %countriesList
hash, so it may be an idea to check your input against those keys before calling.
Will try to connect four times, and return undef
on failure.
Note that latitude and longitude is not (x
,y
) !
LATITUDE AND LONGITUDE
After http://www.mapblast.com/myblast/helpFaq.mb#2:
Zero degrees latitude is the equator, with the North pole at 90 degrees latitude and the South pole at -90 degrees latitude. one degree is approximately 69 miles. Greenwich, England is at 51.466 degrees north of the equator.
Zero degrees longitude goes through Greenwich, England. Again, Each 69 miles from this meridian represents approximately 1 degree of longitude. East/West is plus/minus respectively.
PREREQUISITES
LWP::UserAgent;
HTTP::Request;
HTML::TokeParser;
strict;
warnings.
EXPORTS
None by default.
REVISIONS
SEE ALSO
LWP::UserAgent, HTTP::Request, HTML::TokeParser.
AUTHOR
Lee Goddard lgoddard@cpan.org.
COPYRIGHT
Copyright (C) Lee Goddard, 2001 - All Rights Reserved.
This library is free software and may be used only under the same terms as Perl itself.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 232:
'=item' outside of any '=over'
- Around line 236:
You forgot a '=back' before '=head1'