Lee ♫ Goddard > WWW-MapBlast > WWW::MapBlast

Download:
WWW-MapBlast-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.02   Source  

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 ^

0.02

Now returns street addresses in addition to latitude and longitude.

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.

syntax highlighting: