Connect With WRD
feed via e-mail
feed via e-mail

Posts Tagged ‘Geolocation’

Google Maps, like any other Google product is already easy-to-use and their API is not that complicated to work with.

However, things can always be simpler and GMaps.js, a feature-rich jQuery plugin, helps consuming Google Maps much easier.


Besides adding a standard map of a specific location, we can define the zoom level, add markers, get the location of a user (HTML5 geolocation), define routes, draw polylines and more with only few lines of code.

And, it has callbacks on every action to integrate any custom events. GMaps.js is not documented in detail, however, it has examples of each feature.

The purpose of this tutorial is to show how to create a realtime location aware visitor tracker for a web site or application.

When a visitor navigates to the page on your site, or accesses your mobile web app, the visitor tracker will display the new visitor hit in realtime, displaying the page they've landed on and where each visitor is on a Google map (lat/long and locality). For the purposes of the tutorial, we'll write our server code in PHP, but you could use any server side language you like.

Here is how the end result will look like:

Realtime Vistor Tracker using Pusher

Realitme Visitor Tracker Demo

For the realtime functionality we'll use Pusher, who I work for. Pusher is a hosted service for quickly and easily adding realtime features into web and mobile applications. The service is used for all sorts of features such as notifications, game movements, chat, live data feeds and much more, so it fits the bill nicely here too. We'll be using the Pusher JavaScript API and the Pusher PHP Library.

Here's the order in which we'll cover things:

  1. Get the basics out of the way
  2. Connect to Pusher
  3. Subscribe to new visitor page hits notifications
  4. Get the visitor's location using the HTML5 Geolocation API
  5. Broadcast the visitor location and page to all application visitors using Pusher
  6. Display the visitor location and page information on a Google map

Read the rest of this entry »

jQuery Geo is a plugin for the popular framework that provides an easy-to-use API for map/geolocation related actions.

The plugin uses the open source map servers like Open Street Map, WMS and Esri ArcGIS (Open Street Map by default) for pulling the map data and can:

  • show mapping data and handle direct user interaction with the map
  • use geospatial functions like calculating bounding boxes, measuring the distance between geometries, etc.

jQuery Geo

The maps created are mobile-friendly and have lots of built-in methods for customization.

jQuery Geo is very well-documented and supported with a bunch of examples.

SimpleGeo is a free service which makes creating location-aware applications so simple.

A powerful API & SDKs for various languages exist to easily communicate with the service.


It has 2 free services:

SimpleGeo Context

Using SimpleGeo Context, you can get many details by providing a latitude/longitude like the name of the location, its weather, geographic features, etc.

SimpleGeo Places

It is the world's first open POI (point of interest) data which is maintained by SimpleGeo to make sure it is accurate.

Using SimpleGeo Places, it is possible to learn shopping centers, gas stations, movie theaters, etc. around any given location.

Both services are 100% free with no usage limits.

MooGeo is a MooTools plugin that makes accomplishing common geolocation tasks easy.

These tasks include getting detailed info about an IP (country, city, longitude, latitude, etc.), parsing geographical data from text and even finding Flickr photos about a given place.

MooGeo MooTools Geolocation Plugin

The plugin makes use of multiple free-to-use services like:

  • Yahoo PlaceMaker
  • Yahoo GeoPlanet
  • W3C Geo location
  • Flickr.places.findLatLon

and wraps them into a single package.

MooGeo has also support for events on every level (when a request is sent, completed, success or error) which helps offering a better experience to end users.

GeoNames is a set of  free and downloadable geographical databases of all countries which includes over 8 million place names.

The data comes in tab-delimited + utf-8 formatted text files and can be downloaded as a whole or per country.

Besides the locations of the places/cities/countries, databases include supplementary data like capitals, statistics, timezones and more.

GeoNames data can also be reached from their free webservice which can return results in XML and JSON.


Geolocation is one of the most popular subjects for today's web & there are many solutions that help geo-enabling web applications.

YQL Geo Library is an impressive resource for geolocation as it is totally free & JavaScript-based.

It has various powerful features like:

  • detecting the visitor’s location with the W3C geo API and with IP as a fallback
  • find geo location from text
  • find location from lat/lon pair
  • find locations in a certain web document (by URL)
  • get the location for a certain IP number

YQL Geo Library

The library is lightweight (4kb uncompressed) & non-complicated. It just works by calling a function like:

  alert( + ',' + +  
        ' (' + + ',' +
      + ')'

will get you the city, country, latitude & longitude of any given IP.

Uptime Robot