gxp.util

The gxp.util module contains general utility functions for use in GXP applications.

Functions

Public functions.

gxp.util.dispatch()
Parameters:
  • functionsArray(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.
  • completeFunction A 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.
  • scopeObject Optional 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.

gxp.util.getAbsoluteUrl()
Parameters:urlString
Returns:String

Converts the provided url to an absolute url.

gxp.util.getOGCExceptionText()
Parameters:reportObject The exception report object
Returns:String A single string representing the possible stack of exception messages.

Get a string message from an OGC exception report object.

gxp.util.md5()
Parameters:dataString
Returns:String md5 hash

Encrypts the specified string using MD5.

gxp.util.throttle()
Parameters:
  • funcFunction
  • intervalInteger
  • scopeObject
Returns:

Function

Returns a function, that, when invoked, will only be triggered at most once during a given window of time.

gxp.util.uniqueName()
Parameters:
  • nameString The name to make unique across this session.
  • delimiterChar Optional. Delimiter for appending the number that makes the new name unique. Defaults to ” ” (blank).
Returns:

String a unique name based on name

Appends a delimiter and a number to make the passed name unique in the current session.