Plot your web hits on Google Maps using Apache Geo Map!
The messy code is getting better! If you have improvements please send them to me and I’ll be sure to credit you.
The perl script parses a apache or apache2 combined access log for the IP addresses. It then looks up a Geo-Tag for those locations and if successful it adds them to a data file which the Google maps API then displays. So you get all your unique resolvable hits plotted on a map. From 0.3a onwards new style blue markers are used which contain information about the location when clicked on.
Resolution of the Longitude and Latitude is done by www.hostip.info, If your IP isn’t listed as tagged please please please tag it now! You’ll also need to get your self a google maps api key from here: http://code.google.com/apis/maps/
Check out teh SVN tree SVN Repository
Demo Site for Apache Geo Map
ScreenShot of a parsed file being displayed by Google Maps

Screen shot of Apache Geo Map
I’ve updated the SVN version with a patch from Glen Carreras which fixes a problem with parsing the log file when the timezone is -0700 for example. Thanks also to Jordan Slott and Darren Enns who pointed out this bug.
Also applied patch submitted by glen to allow this script to run on windows!
apachegeomap, ApacheMap, opensource
01/06/08 - Download apache-geo-maps 0.6b
apache-geo-map-0-6b.tar.gz
Changes for this release:
- Cleaned up log Parse code (new code)
- Fixed bug which caused a .data.xml file to be created when defaults where used, this should of been data.xml
- Added browser data to pop-ups
- Added browser icons
- Added country flags to pop-ups
- Added time and date data to pop-ups
- Cleaned up HTML code for example
For the 0.7b release I’m planning on adding one final feature which will rotate the data.xml file’s into monthly views of your hits, which is very useful when you have lots of hits to plot.
apachegeomap, ApacheMap, opensource
I’ve now built a svn repository thats public accessable and includes all the versions from 0.2b onwards. It’ll have the latest version I’m working on, but there is no guarantee that that code will work correctly
To check out the repository follow these instructions:
mkdir ~/apachegeomap
cd ~/apachegeomap
svn co http://dev.squarecows.com/svn/ .
If you’d like to become a develeoper mail me and I’ll grant you write access.
apachegeomap, ApacheMap, opensource
07/05/08 - Download apache-geo-maps 0.5b
apache-geo-map-0-5b.tar.gz
Changes for this release:
- Added config support from command line example: (./apache-geo-map.pl -c /etc/apachegeomap/default.conf). This should allow you to run the script easily for multiple sites.
- The script still supports defaults so you don’t have to specify a config file.
- Added HOWTO
- Fixed bug when script fails, which used to through an error about a missing file.
- Fixed the apachemap.html example file as there were a few incorrect paths specified.
apachegeomap, ApacheMap, opensource
I’ve put the code in to testing for 0.5b. I’ll run it here for a few days whilst I prepare some documention and make sure it works.
Changes for the upcoming release
- Added config support from command line example: (./apache-geo-map.pl -c /etc/apachegeomap/default.conf). This should allow you to run the script easily for multiple sites.
- The script still supports defaults so you don’t have to specify a config file.
- Added HOWTO
- Fixed bug when script fails, which used to through an error about a missing file.
Future elements for 0.6
- Allow elements of the config to be changed on the command line.
- Marker counter details on html page
- Debian and RPM packages
- Better documentation
- Improved html example page
- Code Tidy
apachegeomap, ApacheMap, opensource
13/04/08 - Download apache-geo-maps 0.4b
apache-geo-map-0-4b.tar.gz
Added a new feature which plots new hits in a different colour to old hits to make them easier to see. The markers are then updated to the old colour on the next run. I’ve also released this version under the GPL v3
apachegeomap, ApacheMap, opensource
14/12/07 - Download marker upgrade script
upgrade-markers.pl.gz
This script will loop through your existing data and upgrade the markers to the new format which includes a data popup. Note you need to install the Geo::GeoNames perl module, which resolves the host names using ws.geonames.org
12/12/07 - Download apache-geo-maps 0.3a
apache-geo-map-0-3a.tar.gz
Started using custom icons in blue to show new style hits with City name info popups. NOTE: add icon=”" to your existing markers.
apachegeomap, ApacheMap, opensource
08/02/07 - Download apache-geo-maps 0.2a
apache-geo-map-0-2a.tar.gz
Added the functionality which allows the file to be updated and duplicate IP’s/Locations are now removed.
apachegeomap, ApacheMap, opensource