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[] | Function, 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 | 
      
       The color to fill the Aesthetic element(RGBA) OR a function to create this color.  | 
    |
| public | 
      
       The unique id of the Aesthetic object.  | 
    |
| public | 
      
       Outer is used for the last element of the Legend.  | 
    |
| 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: {itemSize: number, numItems: number}) Adds a new feature to this Aesthetic object.  | 
    |
| public | 
       addGroupedFeature(id: number, triangles: {buffer: WebGLBuffer, itemSize: number, numItems: number}, borders: {buffer: WebGLBuffer, itemSize: number, numItems: number}, 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 | 
      
       Returns all Features as one?  | 
    |
| public | 
      
       Gets this Aesthetic attribute.  | 
    |
| public | 
       getFeatures(): Array<Feature> Returns all Features that belong to this Aesthetic object.  | 
    |
| public | 
      
       Returns the fill color for this Aesthetic object.  | 
    |
| public | 
      
       Returns the size of this Aesthetic points.  | 
    |
| public | 
      
       Returns the stroke color for this Aesthetic object.  | 
    |
| public | 
      
       Verifies if this Aeshtetic element is enable on the Legend or not.  | 
    |
| public | 
      
       Returns if this Aesthetic is outer or not.  | 
    |
Public Constructors
public constructor(id: number, attr: string, fcolor: number[] | Function, 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[] | Function | 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 fillColor: number[4] | Function source
The color to fill the Aesthetic element(RGBA) OR a function to create this color.
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: {itemSize: number, numItems: 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 | {itemSize: number, numItems: number} | The points that belong to the Feature.  | 
    
public addGroupedFeature(id: number, triangles: {buffer: WebGLBuffer, itemSize: number, numItems: number}, borders: {buffer: WebGLBuffer, itemSize: number, numItems: number}, points: {buffer: WebGLBuffer, itemSize: number, numItems: number}) source
Add new grouped feature. Only used for Maps with points.
Params:
| Name | Type | Attribute | Description | 
| id | number | The id of the Feature.  | 
    |
| triangles | {buffer: WebGLBuffer, itemSize: number, numItems: number} | Triangles that belong to the Feature.  | 
    |
| borders | {buffer: WebGLBuffer, itemSize: number, numItems: number} | Borders that belong to the Feature.  | 
    |
| points | {buffer: WebGLBuffer, itemSize: number, numItems: number} | Points that belong to the 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 ?.  | 
    
public enableDisable(): boolean source
Inverts this Aesthetic element state in the Legend object. If it was enabled it will be disabled or vice-versa.
public getFeatures(): Array<Feature> source
Returns all Features that belong to this Aesthetic object.