Namespace: nyc

nyc~ nyc

Top level namespace for NYC mapping

Source:

Members


<static, constant> proj4 :proj4

A proj4 instnce with NYC coordinate systems defined

Type:
  • proj4
Source:

Methods


<static> activeElement()

Returns an object describing the element that currently has focus

Source:
Returns:

An object containing the element and a boolean indicating if it is a text input

Type
Object

<static> cacheBust(minutes)

Returns a cache bust param for query strings

Parameters:
Name Type Description
minutes number

Minutes

Source:
Returns:

Time in milliseconds

Type
number

<static> capitalize(s)

Parameters:
Name Type Description
s string

A string

Source:
Returns:

Input string with the first letter of each word capitalized

Type
string

<static> html(object)

Parameters:
Name Type Description
object Object

An object

Source:
Returns:

HTML string

Type
jQuery

<static> inherits(childCtor, parentCtor)

Provide inheritance for function-based classes using prototype

Parameters:
Name Type Description
childCtor function

The constructor of the subclass

parentCtor function

The constructor of the superclass

Source:

<static> loading(target)

Shows the loading splash screen on eleents with loading class

Parameters:
Name Type Description
target jQuery

Target elements

Source:

<static> mixin(obj, mixins)

Provide mixin functionality

Parameters:
Name Type Description
obj Object

The target of the mixins

mixins Array.<Object>

An array of mixin objects - last in wins

Source:

<static> nextId(prefix)

Parameters:
Name Type Description
prefix string

An id prefix

Source:
Returns:

A unique id

Type
string

<static> noSpaceBarScroll()

Disables scrolling on keypress when user presses the space bar on a button or a link by adding a kepress event handler to the document. The click event is triggered on buttons and links without and href attribute or with an href value of #. If a link has an href the browser will navigate to that location. If a link also has a target attribute the navigation will take place in a new tab.

Source:

<static> ready( [target])

Clears the loading splash screen

Parameters:
Name Type Argument Default Description
target jQuery <optional>
body

Target elements

Source:

<static> removeDups(arr)

Returns an array with duplicates removed

Parameters:
Name Type Description
arr Array.<string> | Array.<number>

An array with possible duplicates

Source:
Returns:

An array without duplicates

Type
Array.<string> | Array.<number>

<static> subclass(childObj, parentObj)

Provide for function-based classes to inherit from ES5 and ES6 classes

Parameters:
Name Type Description
childObj Object

An instance of the subclass

parentObj Object

An instance of the superclass

Source: