S4 API - Septima/spatialsuite-s4 GitHub Wiki
This is the interface of s4:
- s4Hit, The default onSelect function which is called when the user selects a result.
- Calls all listeners and
- (if no listener has returned false) marks the result in the map
- _s4Searchers, Array of searchers. Push a searcher to this array to make it active
- _s4OnSelect, Array of listeners to Select events.
- A listener is a function which is called with one argument: result.
- If a listener returns false the chain of listeners is stopped.
- If all listeners return true the default function s4Hit will be called as the last listener function
Before using the API please check that s4 has been included: [if: ModuleDefined("s4") ]
Please see How to use the datasource searcher for example of usage