Class: Popup maps.nyc.gov

nyc.carto.Popup

A class to create and manage CartoDB infowindows and tooltips
Parameters:
Name Type Description
options nyc.carto.Popup.Options Constructor options
Source:
Fires:

Extends

Members

(static) EventType :string

Enumerator for popup event types
Type:
  • string
Properties:
Name Type Description
SHOW_POPUP string The popup showpopup event type
HIDE_POPUP string The popup hidepopup event type
TIP_CHANGE string The tooltip tipchange event type
Source:

infowin :Object

The CartoDB infowindow
Type:
  • Object
Source:

popupEventData :Array.<Object>

The CartoDB featureClick event arguments
Type:
  • Array.<Object>
Source:

tip :Object

The CartoDB tooltip
Type:
  • Object
Source:

tipEventData :Array.<Object>

The CartoDB featureOver event arguments
Type:
  • Array.<Object>
Source:

Methods

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:

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

Object type to hold constructor options for nyc.carto.Popup
Type:
  • Object
Properties:
Name Type Attributes Description
map L.Map The Leaflet map on which the popup will be displayed
layer cartodb.CartoDBLayer.SubLayer The layer whose feature info will be displayed in the popup
interactivity Array.<string> The data fields required by the template
template string Template with replacement tokens for popup content (may optionally include an element of class 'tip-tmpl' for rendering tooltips)
onShowPopup function <optional>
A function to handle the popup show event
onHidePopup function <optional>
A function to handle the popup hide event
onTipChange function <optional>
A function to handle the tooltip change event
Source:

Events

hidepopup

The result of a popup hidepopup event
Type:
Source:

showpopup

The result of a popup showpopup event
Type:
Source:

tipchange

The result of a popup tipchange event
Type:
Source: