Using Google Maps to show the geographical location of your website's visitors
Note: Most of the actual code I use in my own implementation is actually in this tutorial. I do, however, plan to release the source code in its entirety for free, but I need to clean it up and make it easier to understand/modify first. If you’d like to be notified when it is available for download (early this week sometime), please click here.
This tutorial is meant to show you how you can use the Google Maps API to visually show visitors to your website. You can see my implementation of it here.
You may ask “Why is this useful?” That is a very good question. How useful it is will depend on how you intend to use it. For me, it was just a cool idea at 2 AM :) You may wish to have an easy way of telling where your customers are. Or, you may want to tell get an idea of when you can safely bring your website down for maintenance. Or you may just be like me and want something fun to do on a Sunday night.
Regardless of how useful the application may be to you, we will be using several techniques that are very useful and may be new to you, including:
- AJAX (Asynchronous JavaScript with XML)
- Using DOM-XML in PHP 5
- Parsing XML with JavaScript
This tutorial is a bit long, but I promise it will be worth it :) Should you have any questions, please visit our forum. I try to check in several times per day and am quite happy to answer any questions I can.
Part I – What you’ll need >>
|