Class: HeatSymbolizer maps.nyc.gov

nyc.carto.HeatSymbolizer

new HeatSymbolizer(options)

Class for managing heat map rendering based on zoom level
Parameters:
Name Type Description
options nyc.carto.HeatSymbolizer.Options Constructor options
Implements:
Source:
Fires:

Extends

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:

replace(str, values) → {string}

Replace tokens in a string with values from a provided object
Parameters:
Name Type Description
str string String with tokens to be replaced
values Object.<string, string> Values token for replacement
Inherited From:
Source:
Returns:
String with replacement value substitution
Type
string

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.HeatSymbolizer
Type:
  • Object
Properties:
Name Type Attributes Default Description
map L.Map The Leaflet map containing the heat map layer
layer carto.Layer The CartoDB heat map layer
css string CartoCSS with optional replacement tokens for rendering the heat map (valid tokens are ${size}, ${sizePlus2} and ${sizePlus4})
sizes Array.<Number> <optional>
[2, 4, 8, 16, 32, 64, 128, 256, 512] An array of marker sizes for replacing tokens in the css where the last number in the array is to be used at zoom level 18
Source:

Events

symbolized

The CartoCSS applied to the heat map layer
Type:
  • String
Implements:
Source: