Browsing Posts in GeoIP

I ran across a little problem today where an application written for our website, and running the Google Maps API was 'causing the browser to crash, but as always with 'quirks'...  only in IE6!

After some time fiddling around on the internet and reading quite a few interesting articles about the stability of the Google Maps API within IE6 I found a few things listed as the most common causes : (

  • Script position. Make sure the Google Maps API script is called in either the head of your HTML or at the very end. Embedding within HTML should be avoided.
  • Make sure a valid doctype is declared. Remember the xmlns="" xmlns:v="urn:schemas-microsoft-com:vml" attributes need to be added if you are presenting polylines in mapping applications
  • Ensure you have set a size for your google_map DIV
  • In your javascript make sure that the variable you assign new GMap2(); to is unique. Commonly it is assigned as var map = new GMap2(); make sure that variable is unique.
  • Good practice is to ensure your document W3C validates. Clean (X)HTML is a great place to start.

Other things to be aware of. In the script src tag Google passes the major script version into the query string. BUT... this can be, although not recommended, also be used to pass in minor version stamps too. i.e.

For a list of API Version Changes refer to this Google page.

You learn something everyday. I've been asked to create a distributor feature of and was beginning to wonder where on earth you would start. I wanted to tie it in with the Google Maps API and do some fancy Web2.0 UI stuff. Well after a bit of searching I started to read about the Haversine formula on the Wiki.

Now I'll admit I'm not the greatest at maths, but it lead me onto some more searches and eventually this article on Google. Brilliant, this is an excellent starting point ! Having never created a store locator before I'm going to append notes to this article based on my findings so anyone else happening across this on the internet will know what to do ! provide a free GeoIP database in binary format (.dat), and some PHP class files for performing GeoIP lookup's on an IP address.

I wrote an article on their support forums here :

detailing how to install and use the GeoIP class files with AWStats