Notes on Geocoding Plugins

When using the Orbit WebClient using the Javascript API you can make use of a client-side “Geocode Plugin”. These plugins can be used to let the user of a Publication reverse geocode a location.

Add/Remove Plugins

Geocode plugins are stored here :

/server/program/services/publisher/publication_geocode_plugins

Adding or removing plugins on the Publisher server is as easy as adding or removing files from this folder. Each geocoding plugins is defined by this set of files :

Implementing Plugins

When implementing a geocoding plugin, you can expect this object to exist :

Your implementation should provide the following objects :

geocode()

Signature : geocode(query,handleResult,handleFault).

/**
 * Implements the geocoding request.
 * @param query the user query string.
 * @param handleResult the function to call when geocoding results arrive.
 * @param handleFault the function to call when an error occurs.
 */
orbit.webclient.GeocodePlugins.<plugin-name>.geocode = function(query,handleResult,handleFault) 
{
   // ...
}  	

When a geocoding result is found, the plugin should call handleResult(results) :

When an error occurs, the plugin should call handleFault(error) :