Gaze into my Aja(x)

I wanted to make the Gaze lookup service an Asynchronous call (AJAX
without the X), but the problem lies in not typically being allowed to
make async calls to a non-local host. Therefore, I wrapped up the Gaze
service in a little PHP code (gaze-rest.php) that has the same API as
the actual gaze service, but acts like a 'local service'.

The page then makes a Javascript call, which gets the values from the
form and makes the async call. The returned value is put in the

Right now I hardcoded the US and GB, but plan on extending it to
actually dynamically fill the options via a find_places_get_countries
call to Gaze.

The source is available as a link at the bottom of the page.

About this article

written on
posted in ProgrammingGeolocationWebOpen-SourceJavascript Back to Top

About the Author

Andrew Turner is an advocate of open standards and open data. He is actively involved in many organizations developing and supporting open standards, including OpenStreetMap, Open Geospatial Consortium, Open Web Foundation, OSGeo, and the World Wide Web Consortium. He co-founded CrisisCommons, a community of volunteers that, in coordination with government agencies and disaster response groups, build technology tools to help people in need during and after a crisis such as an earthquake, tsunami, tornado, hurricane, flood, or wildfire.