Namespace: util

dbkjs. util

Methods

(static) appendTab(parent_id, tab_title, tab_content, active, idopt) → {String}

Return the tab_content id placeholder so chained functions have a reference. Can be used with an existing id to change a tab.

Parameters:
Name Type Attributes Description
parent_id String

id for the parent DOM element

tab_title String

Title to apply

tab_content String

Content to apply

active Boolean

tab on/off

id String <optional>

id to set to the tab. If not set it will be generated

Returns:

id - the id of the created tab

Type
String

(static) changeDialogTitle(title, dialogid)

Change the title for a panel

Parameters:
Name Type Description
title String

Title to set

dialogid String

Dialog to apply the title to

(static) convertJstsToOlGeom(jstsGeom) → {Object}

Convert jsts Geometry to OpenLayers Geometry

Parameters:
Name Type Description
jstsGeom Object

WKT Geometry

Returns:

olGeom - OpenLayers geom

Type
Object

(static) convertOlToJstsGeom(olGeom) → {Object}

Convert OpenLayers Geometry to jsts Geometry

Parameters:
Name Type Description
olGeom Object

OpenLayers Geometry

Returns:

wktGeom - WKT Geometry

Type
Object

(static) createTabbable(id) → {jQuery.DOMElement}

Parameters:
Name Type Description
id String

(optional)

Returns:

the new table element for tabular object

Type
jQuery.DOMElement

(static) extend(destination, source) → {Object}

Parameters:
Name Type Description
destination
source
Returns:

destination

Type
Object

(static) gcd(a, b) → {unresolved}

Calculate the ratio for print

Parameters:
Name Type Description
a type
b type
Returns:
Type
unresolved

(static) getFeaturesForBuffer(vLayer, buffer) → {Collection}

Get Features from the Map given a buffer

Parameters:
Name Type Description
vLayer Object

OpenLayers Layer to grab from

buffer Object

the buffer that should be applied

Returns:

features - OpenLayers features

Type
Collection

(static) getFeaturesForLine(vLayer, jstsLine, bufdist) → {Collection}

Get Features from the Map given a line and distance

Parameters:
Name Type Description
vLayer Object

OpenLayers Layer to grab from

jstsLine Object

the line

bufdist integer

The distance that will be used to buffer the line

Returns:

features - OpenLayers features

Type
Collection

(static) getQueryVariable(variable, defaultvalueopt) → {String}

Grab the value for a parameter from a query string

Parameters:
Name Type Attributes Description
variable String

the parameter to fetch

defaultvalue String <optional>

pass a default for when the parameter is not found or returns no value

Returns:

value - the value for the given parameter

Type
String

(static) inherit(C, P)

Parameters:
Name Type Description
C
P

(static) isJsonNull(val)

Handle various forms of values that should all evaluate to false

Parameters:
Name Type Description
val Object

the object to check for null values

(static) mediaError(e) → {Boolean}

Process an error when a media object cannot be retrieved and return if there is an error or not

Parameters:
Name Type Description
e event
Returns:

error - true or false

Type
Boolean

(static) onClick(e)

Handle click events

Parameters:
Name Type Description
e Object

the event

(static) pad(num, size) → {String}

Apply padding to a number

Parameters:
Name Type Description
num integer

the number to pad

size integer

the length of the resulting padded string

Returns:

s - padded number as string

Type
String

(static) parseSeconds(duration) → {String}

Reformat a display time when adding seconds

Parameters:
Name Type Description
duration integer

the number of seconds to add

Returns:

displayTime - the formatted time to display

Type
String

(static) setModalTitle(modal_id, title)

Set the title of the modal

Parameters:
Name Type Description
modal_id String

id for the DOM element to fetch

title String

Title to apply

(static) toggleOverlay(obj)

script to toggle overlayes on/off

Parameters:
Name Type Description
obj Object

the to toggle

(static) touchEnabled() → {Boolean}

Check to see if touch is enabled

Returns:

enabled - true/false

Type
Boolean