Aesthetic
Class that represents an aesthetic element. There will be one Aesthetic class for each class on the Legend.
Constructor Summary
Public Constructor | ||
public |
constructor(id: number, attr: string, fcolor: number[], stroke: number[], pointsize: number | null, range: number[]) Creates an instance of Aesthetic. |
Member Summary
Public Members | ||
public |
This particular element will be active or not in the Legend. |
|
public |
fillColor: number[4] The color to fill the Aesthetic element(RGBA). |
|
public |
The unique id of the Aesthetic object. |
|
public |
Outer of? This is used for what? |
|
public |
The size of the Aesthetic point to be drawn (Used only in maps that require dots to be drawn). |
|
public |
range: number[2] The range for this particular Aesthetic element. |
|
public |
strokeColor: number[4] Stroke color values(RGBA). |
Private Members | ||
private |
This Array is used for? |
|
private |
The attribute being mapped on the Aesthetic. |
|
private |
This Array will keep track of all Features associated with this Aesthetic object. |
Method Summary
Public Methods | ||
public |
addFeature(id: number, properties: {fx: string, _gisplayid: number}, triangles: {itemSize: number, numItems: number}, borders: {itemSize: number, numItems: number}, points: number[]) Adds a new feature to this Aesthetic object. |
|
public |
addGroupedFeature(id: number, triangles: null, borders: null, points: {buffer: WebGLBuffer, itemSize: number, numItems: number}) Add new grouped feature ? |
|
public |
checkProperty(value: string): boolean Verifies the existence or not of the property Aesthethic._attr and if it fits inside this Aesthetic range. |
|
public |
Inverts this Aesthetic element state in the Legend object. |
|
public |
Gets this Aesthetic attribute. |
Public Constructors
public constructor(id: number, attr: string, fcolor: number[], stroke: number[], pointsize: number | null, range: number[]) source
Creates an instance of Aesthetic. There will be as many Aesthetic objects as the number of classes on the Legend.
Params:
Name | Type | Attribute | Description |
id | number | The unique id of the Aesthetic object. |
|
attr | string | The attribute being mapped on this Aesthetic. |
|
fcolor | number[] | The color to fill the Aesthetic element(RGBA). |
|
stroke | number[] | Stroke color values(RGBA). |
|
pointsize | number | null | Size of the Aesthetic point to be drawn (Used only in maps that require dots to be drawn). |
|
range | number[] | The range for this particular Aesthetic element. |
Example:
1-> {"id":0,"attr":"f3","fcolor":[255,255,255,0.8],
"stroke":[0,0,0,1],"pointsize":null,"range":[1,37]}
2-> {"id":1,"attr":"f3","fcolor":[255,255,0,0.8],
"stroke":[0,0,0,1],"pointsize":null,"range":[37,78]}
Public Members
public pointSize: number | null source
The size of the Aesthetic point to be drawn (Used only in maps that require dots to be drawn).
Private Members
Public Methods
public addFeature(id: number, properties: {fx: string, _gisplayid: number}, triangles: {itemSize: number, numItems: number}, borders: {itemSize: number, numItems: number}, points: number[]) source
Adds a new feature to this Aesthetic object.
Params:
Name | Type | Attribute | Description |
id | number | The Feature id. Each feature will have a different id inside this Aesthetic object. |
|
properties | {fx: string, _gisplayid: number} | Properties associated with the Feature. |
|
triangles | {itemSize: number, numItems: number} | Number of triangles associated with the Feature. |
|
borders | {itemSize: number, numItems: number} | Number of borders associated with the Feature. |
|
points | number[] | The points that belong to the Feature. |
public addGroupedFeature(id: number, triangles: null, borders: null, points: {buffer: WebGLBuffer, itemSize: number, numItems: number}) source
Add new grouped feature ?
TODO:
- Finish document of this method.
public checkProperty(value: string): boolean source
Verifies the existence or not of the property Aesthethic._attr and if it fits inside this Aesthetic range.
Params:
Name | Type | Attribute | Description |
value | string | The attribute ?. |