Legend
This class represents the Map Legend. 15/03
Constructor Summary
Public Constructor | ||
public |
constructor(id: number, title: string) Creates an instance of Legend class. |
Member Summary
Public Members | ||
public |
Constant to use when it's a Point. |
|
public |
Constant to use when it's a Polygon. |
|
public |
Class name for the Legend? Not used? |
|
public |
If it is the first insertion or not. |
|
public |
lastdiv: HTMLDivElement The last div to insert in the legend. |
|
public |
legendDiv: HTMLDivElement The div that contains the Legend. |
|
public |
table: HTMLTableElement The table element where the legend elements will be apppended. |
|
public |
Title of the Gisplay map Legend. |
Method Summary
Public Methods | ||
public |
Initialise Legend. |
|
public |
insertGradient(mapobj: Map, left: number, middle: number, right: number) this method was deprecated. Not used, since now Change Maps use classes instead of gradient.
Inserts in the Legend one gradient according to the Aesthetic object. |
|
public |
insertLegend(bgMap: BGMapWrapper) Appends the legend div element to the map container. |
|
public |
insertPointRow(currentaes: Aesthetic, mapobj: Map) Inserts one row for the Aesthetic object. |
|
public |
insertPolygonRow(currentaes: Aesthetic, mapobj: Map) Inserts one polygon row into the Legend. |
|
public |
insertProportionalSymbols(currentaes: Aesthetic, mapobj: Map, numLegendItems: number) Inserts one Proportional symbols legend element. |
|
public |
Adds one row to the Legend and attaches an on click event to said row. |
Public Constructors
Public Members
public table: HTMLTableElement source
The table element where the legend elements will be apppended.
Public Methods
public init(id: number, classname: string) source
Initialise Legend. Creates a table element and appends title, color element and value element.
public insertGradient(mapobj: Map, left: number, middle: number, right: number) source
Inserts in the Legend one gradient according to the Aesthetic object. Use in Change Maps.
public insertLegend(bgMap: BGMapWrapper) source
Appends the legend div element to the map container. Used by all Maps.
Params:
Name | Type | Attribute | Description |
bgMap | BGMapWrapper | The background map where the legend will be appended to. |
public insertPointRow(currentaes: Aesthetic, mapobj: Map) source
Inserts one row for the Aesthetic object. Used in Dot Maps.
public insertPolygonRow(currentaes: Aesthetic, mapobj: Map) source
Inserts one polygon row into the Legend. Used for area based Maps (Choropleth and Chorocromatic).
public insertProportionalSymbols(currentaes: Aesthetic, mapobj: Map, numLegendItems: number) source
Inserts one Proportional symbols legend element. Used by PSymbols Maps.