Class: BinLegend maps.nyc.gov

nyc.BinLegend

new BinLegend(name, symbolType, binType)

A class to generate legend HTML with classifications for bins or buckets
Parameters:
Name Type Description
name string The name of the legend
symbolType nyc.BinLegend.SymbolType The symbol type for the legend
binType nyc.BinLegend.BinType The bin type for the legend
Source:

Extends

Members

(static) BinType :string

Enumeration for legend bin type
Type:
  • string
Properties:
Name Type Description
RANGE_NUMBER string Range of numbers
RANGE_INT string Range of integers
VALUE string Range of values
Source:

(static) SymbolType :string

Enumeration for legend symbol type
Type:
  • string
Properties:
Name Type Description
POLYGON string Polygon symbol
LINE string Line symbol
POINT string Point symbol
GRADUATED_POINT string Graduated point symbol
Source:

Methods

html(caption) → {JQuery}

Returns the legend HTML as a JQuery object
Parameters:
Name Type Description
caption string A legend caption
Overrides:
Source:
Returns:
The HTML element for the legend wrapped in a JQuery object
Type
JQuery

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