Reusable Accessible Mapping Platform

API Docs for: 2.0.0
Show:

Prototype Class

Adds method prototypes to predefined classes to enhance their functionality.

Methods

_initArrayPrototype

() Array private

Add extra functions to the Array object. Adds the following:

  • Array.remove() - prototype for removing items from array
  • Array.append(arr) - Add all the elements of the given array to this array.
  • Array.isEmpty() - Returns true if the length of the array is 0.
  • Array.last() - Returns true if the length of the array is 0.
  • Array.contains(obj) - Returns true if this Array contains the given object
  • Array.flatter(arr) - Array Flatten object extention: http://tech.karbassi.com/2009/12/17/pure-javascript-flatten-array/
  • Array.max() - Returns the max value in the array
  • Array.min() - Returns the min value in the array

Returns:

Array:

The array

_initEsriPrototype

() Array private

Add extra functions to the EsriExtent object. Adds the following:

  • EsriExtent.clone() -
  • EsriExtent.widht() -
  • EsriExtent.height() -
  • EsriExtent.xyAspectFactor() - Returns the ratio of this Extent's width to this Extent's height
  • EsriExtent.centerX() -
  • EsriExtent.centerY() -
  • EsriExtent.center() -
  • EsriExtent.pan() -

Returns:

Array:

The array

_initJQueryprototype

() Array private

Add extra jQuery functions. Adds the following:

  • $.findInputLabel() - Returns labels corresponding to the set of input controls.
  • $.isOverflowed() - Detects if the given span is overflowing with text

Returns:

Array:

The array

_initObjectPrototype

() Array private

Add extra functions to the Object object. Adds the following:

  • Object.create(o) - Takes an old object as a parameter and returns an empty new object that inherits from the old one

Returns:

Array:

The array

_initStringPrototype

() Array private

Add extra functions to the String object. Adds the following:

  • String.format() - format the string replacing the placeholders with provided values
  • String.replaceAll(search, replace) - replaces all instances

Returns:

Array:

The array

addProtytype

(
  • obj
  • name
  • fcn
)
private

Attempt to add the given fcn as a prototype to the given obj under the given name. Outputs a warning message to the console if a prototype of the same name already exists.

Parameters:

AddStaticFcn

(
  • obj
  • name
  • fcn
)
private

Attempt to add the given fcn as a static function to the given class under the given name. Outputs a warning message to the console if a function of the same name already exists.

Parameters:

load

(
  • id
  • require
  • load
)

Defines useful prototypes for basic types in javascript (e.g. String, Array)

Parameters: