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 : (http://www.easypagez.com/maps/ieworking.html)

  • 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="http://www.w3.org/1999/xhtml" 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. http://validator.w3.org/ 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. http://maps.google.com/maps?file=api&v=2 BUT... this can be, although not recommended, also be used to pass in minor version stamps too. i.e. http://maps.google.com/maps?file=api&v=2.117

For a list of API Version Changes refer to this Google page. http://groups-beta.google.com/group/Google-Maps-API/web/api-version-changes

You learn something everyday. I've been asked to create a distributor feature of satinsmooth.com 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 !

Maxmind.com 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 :
http://forum.maxmind.com/viewtopic.php?t=27

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

  • Page
    of 2
  • Next