NAME

Image::Maps::Plot::FromPostcode - from postcodes plot world/regional maps in JPEG/HTML

DESCRIPTION

This module is a sub-class of Image::Maps::Plot::FromLatLong, that uses the WWW::MapBlast module to convert postcodes to latitude and longitude.

OVER-RIDDEN METHODS

METHOD add_entry

A method that accepts: $name, $country, $postcode

Looks up on MapBlast.com the supplied details, and adds them to the db.

If an entry already exists for $name, will return undef unless the global scalar $ADDENTRY is set to it's default value of MULTIPLE, in which case $name will be appended with $country and $postcode.

Does not save them to file - you must do that manually ("METHOD save_db"), but note that you may wish to load the db before adding to it and saving.

Incidentaly returns a reference to the new key.

See also "ADDING MAPS".

&remove_entry

A subroutine, not a method, that accepts the name field of the entry in the db, and returns 1 on success, undef if no such entry exists.

BACKGROUND

I was bored and got this message on a list:

From: london.pm-admin@london.pm.org
[mailto:london.pm-admin@london.pm.org]On Behalf Of Philip Newton
Sent: 21 June 2001 11:44
To: 'london.pm@london.pm.org'
Subject: Re: headers

Simon Wistow wrote:
> It's more a collection of people who have the common connection
> that they live and london and like perl.
> In fact neither of those actually have to be true since I personally
> know two people on the list who don't program Perl and one of whom
> doesn't even live in London.

How many off-London people have we got? (Well, also excluding people who
live near London.)

From outside the UK, there's Damian, dha, Paul M, I; Lucy and lathos
probably also qualify as far as I can tell. Marcel used to work in London
(don't know whether he still does). Anyone else?

Cheers,
Philip
--
Philip Newton <Philip.Newton@datenrevision.de>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.

In the twenty-second weekly summary of the London Perl Mongers mailing list, for the week starting 2001-06-18:

In other news: ... a london.pm world map ...

Hence the module. At that time there were no maps to plot from postcodes.

REVSIONS

2

Made this a sub-class of the new *::FromLatLong to remove what has, for me personally, become redundent functionality. Interface remains unchanged, I think.

1.2

Corrected a slight mis-positioning of points.

Replaced GD with Image::Magick as I was seeing terrible JPEG output with GD.

Replaced support for non-maintained Image::GD::Thumbnail with Image::Thumbnail.

Added methods to create just images and to return references to image blobs.

1.0

Don't remember.

0.25

Clean IMG path and double-header bugs

0.23

Added more documentation; escaping of href text

0.22

Added thumbnail images to index page

SEE ALSO

perl(1); Image::Maps::Plot::FromLatLong; Image::Magick (http://www.ImageMagick.org); File::Basename; Acme::Pony; Data::Dumper; WWW::MapBlast; Image::Thumbnail

THANKS

Thanks to the London.pm group for their test data and insipration, to Leon for his patience with all that mess on the list, to Philip Newton for his frankly amazing knowledge of international postcodes.

Thanks also to the CIA, About.com, The University of Texas, and The Ordnance Survey for their public-domain maps.

AUTHOR

Lee Goddard <lgoddard@cpan.org>

COPYRIGHT

Copyright (C) Lee Goddard, 2001. All Rights Reserved.

This module is supplied and may be used under the same terms as Perl itself.

The public domain maps provided with this distribution are the property of their respective copyright holders.