gri6507 has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am looking for a way to generate a picture of the world map with a few dots on it each of which represents an IP address (or a domain name) for a list of URLs from a text file. Basically, I would like to do something similar to what's offered here except that my application has nothing to do with parsing visitor logs.

So, I guess my first question is if someone know whether or not a perl-ish way for doing this already exists. If not, then here's what I have come up with on my own so far. I can use perl's Geo::IP module to translate a URL (or IP address) into latitude and longitude coordinates. My question then turns into how would one go about mapping these coordinates? I know that Google Maps can do it (and there is even IWL::Google::Map for that), however this seems like a huge overkill for what I'm trying to do. So, can anyone suggest a better method?

thanks in advance!

  • Comment on Perl-ish way to generate world map with IP address info

Replies are listed 'Best First'.
Re: Perl-ish way to generate world map with IP address info
by almut (Canon) on Mar 02, 2010 at 19:39 UTC
Re: Perl-ish way to generate world map with IP address info
by punkish (Priest) on Mar 02, 2010 at 20:23 UTC
    I know that Google Maps can do it (and there is even IWL::Google::Map for that), however this seems like a huge overkill for what I'm trying to do
    Google has gathered all the map data, serves it to you without you having to pay for it or maintain the servers, provides an API that lets you draw points on their map... they have done just about all the difficult parts of the problem. Why do you say it is an overkill?
    --

    when small people start casting long shadows, it is time to go to bed
      Let me clarify that. For one thing, using Google Maps requires an internet connection. It's not a lot to ask, but it does add overhead to my script requirements. Google also requires you to get a key. I know that getting that key is free, but as far as I can tell, that key is tied to one domain name and that means that if I run the script on a different machine, the key is invalid. It seems like a heavy handed requirement to have to register every time you move the script. Lastly, Google provides a wonderfully rich interface. Frankly, it's too much for what I want. All I need is a simple map with dots on it; no need for zooming, panning, hover effects, etc. This is all good, but, like I said, it's all extra.
        Look at something like http://search.cpan.org/~lbrocard/Image-WorldMap-0.15/WorldMap.pm
        --

        when small people start casting long shadows, it is time to go to bed