gxp.util¶
The gxp.util module contains general utility functions for use in GXP
applications.
Functions¶
Public functions.
-
gxp.util.dispatch()¶ Parameters: - functions –
Array(Function)List of functions to be called. All functions will be called with two arguments - a callback to call when the sequence is done and a storage object. - complete –
FunctionA function that will be called when all other functions report that they are done. The final callback will be called with the storage object passed to all other functions. - scope –
ObjectOptional object to be set as the scope of all functions called.
Allows multiple asynchronous sequences to be called in parallel. A final callback is called when all other sequences report that they are done.
- functions –
-
gxp.util.getAbsoluteUrl()¶ Parameters: url – StringReturns: StringConverts the provided url to an absolute url.
-
gxp.util.getOGCExceptionText()¶ Parameters: report – ObjectThe exception report objectReturns: StringA single string representing the possible stack of exception messages.Get a string message from an OGC exception report object.
-
gxp.util.md5()¶ Parameters: data – StringReturns: Stringmd5 hashEncrypts the specified string using MD5.
-
gxp.util.throttle()¶ Parameters: - func –
Function - interval –
Integer - scope –
Object
Returns: FunctionReturns a function, that, when invoked, will only be triggered at most once during a given window of time.
- func –
-
gxp.util.uniqueName()¶ Parameters: - name –
StringThe name to make unique across this session. - delimiter –
CharOptional. Delimiter for appending the number that makes the new name unique. Defaults to ” ” (blank).
Returns: Stringa unique name based onnameAppends a delimiter and a number to make the passed
nameunique in the current session.- name –