Introduction

The GeoNames API is powerful. It uses the GeoNames webservices for its request and implements all the available XML-based services. View the Service Examples in the menu to the left to test some of the implemented services (for example GeoNames Fulltext Search where results are GMapped), or have a look at the documentation pages to read usage instructions for all of them. Check out the forum for Code Examples.

This module is a (close to) complete API, supporting all of the 18 XML services - perfect for geocoding, but you will currently need some basic programming skills to make it work.

If you are going to use the service actively, you, your boss, wife or friend should purchase some Credits for use with the GeoNames Professional Services. The credits are underpriced and cheap - the perfect bargain - see this page for more information. The free service is suffering because of its popularity, so the main advantage of the professional service is stability and quicker response times (From 3 - 4 seconds to .3 - .5 seconds).

The GeoNames API comes with a configuration page (Administer->Site configuration->Geonames) where you can manage the cache settings, configure the commercial services - and specify where to put the documentation.

You should visit the GeoNames Web Services pages for full documentation of the services and for general information about GeoNames. Much of the information is available in several languages.

Basic Usage Instructions

$result = geonames_query($service, $query, $options)
$service (service name, i.e. search, nearbywikipedia, nearbyplace...)
$query - the query you want to post, see the documentation for required and allowed parameters
$options - optional associative array, possible keys: columns (array of field names), sortby (string fieldname) and sortorder (string ASC or DESC)
$result - Result object, containing all your results - plus some additional info ;)

Good luck! ;)

Syndicate content