Geo-Enable Websites With JS: YQL Geo Library
Geolocation is one of the most popular subjects for today's web & there are many solutions that help geo-enabling web applications.
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
The library is lightweight (4kb uncompressed) & non-complicated. It just works by calling a function like:
alert(o.place.name + ‘,’ + o.place.country.content +
‘ (‘ + o.place.centroid.latitude + ‘,’ +
o.place.centroid.longitude + ‘)’
will get you the city, country, latitude & longitude of any given IP.