- Subroutine latlon (country, postcode)
- LATITUDE AND LONGITUDE
- SEE ALSO
WWW::MapBlast - latitude & longitude from postal codes.
use WWW::MapBlast; my ($lat, $lon) = WWW::MapBlast::latlon('United Kingdom','BN3 3AG'); __END__;
Simply accesses MapBlast.com and retrieves latitude and longitude information.
Only minimal error checking, so have a look through the source before you use.
Set $CHAT if you wish to see what's going on during net access.
Accepts a country name and a postal code, returns the relative latitude and longitude as defined by MapBlast.com
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 (
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.
LWP::UserAgent; HTTP::Request; HTML::TokeParser; strict; warnings.
None by default.
Lee Goddard email@example.com.
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'