maps.nyc.gov

Class: Goog

nyc.lang.Goog(options)

new Goog(options)

Class for language translation using the Google Translate Gadget
Parameters:
Name Type Description
options nyc.lang.Goog.Options Constructor options
Source:

Extends

Methods

getCookieValue() → {string}

Overrides:
Source:
Returns:
Type
string

init()

Callback to set up Google Translate
Source:

lang() → {string}

Get the currently chosen language code
Inherited From:
Source:
Returns:
The currently chosen language code
Type
string

off(eventName, evtHdlr, hdlrScopeopt)

Remove a previously connected event handler
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

on(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

one(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event for a single invocation
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

render()

Inherited From:
Source:

translate()

Sets the chosen language and initiates Google Translation
Overrides:
Source:

trigger(eventName, dataopt)

Trigger a named event with event data
Parameters:
Name Type Attributes Description
eventName string The name of the event to trigger
data Object <optional>
The event data
Inherited From:
Source:

Type Definitions

Options

Constructor for nyc.lang.Translate
Type:
  • Object
Properties:
Name Type Attributes Default Description
target String | Element | JQuery The HTML DOM element that will provide language choices
languages nyc.lang.Translate.Choices The languages to provide
isButton boolean <optional>
false Show as a button
showArrow boolean <optional>
false Show the hint arrow if displaying as a button
Source:

Events

change

The language value has changed
Type:
  • string
Inherited From:
Source:

ready

The class has completed initialization
Type:
  • boolean
Inherited From:
Source:

nyc-lib: Class: Goog

maps.nyc.gov

Class: Goog

nyc.lang.Goog(options)

new Goog(options)

Class for language translation using the Google Translate Gadget
Parameters:
Name Type Description
options nyc.lang.Goog.Options Constructor options
Source:

Extends

Methods

getCookieValue() → {string}

Overrides:
Source:
Returns:
Type
string

init()

Callback to set up Google Translate
Source:

lang() → {string}

Get the currently chosen language code
Inherited From:
Source:
Returns:
The currently chosen language code
Type
string

off(eventName, evtHdlr, hdlrScopeopt)

Remove a previously connected event handler
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

on(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

one(eventName, evtHdlr, hdlrScopeopt)

Connect a function to an event for a single invocation
Parameters:
Name Type Attributes Description
eventName string The name of the event to which the handler will be connected
evtHdlr function The event handler function
hdlrScope Object <optional>
The scope in which to invoke the event handler
Inherited From:
Source:

render()

Inherited From:
Source:

translate()

Sets the chosen language and initiates Google Translation
Overrides:
Source:

trigger(eventName, dataopt)

Trigger a named event with event data
Parameters:
Name Type Attributes Description
eventName string The name of the event to trigger
data Object <optional>
The event data
Inherited From:
Source:

Type Definitions

Options

Constructor for nyc.lang.Translate
Type:
  • Object
Properties:
Name Type Attributes Default Description
target String | Element | JQuery The HTML DOM element that will provide language choices
languages nyc.lang.Translate.Choices The languages to provide
isButton boolean <optional>
false Show as a button
showArrow boolean <optional>
false Show the hint arrow if displaying as a button
Source:

Events

change

The language value has changed
Type:
  • string
Inherited From:
Source:

ready

The class has completed initialization
Type:
  • boolean
Inherited From:
Source: