import {GisplayOptions} from 'gisplay-es6-webpack/src/Gisplay/GisplayOptions.js'
GisplayOptions
This class will contain all the options available on the Gisplay API.
Constructor Summary
Public Constructor | ||
public |
constructor(userOptions: Object) Creates a new Options object. |
Member Summary
Public Members | ||
public |
Alpha to be used in WebGL. |
|
public |
The attribute to be mapped. |
|
public |
Class intervals. |
|
public |
Algorithm to be used by the API to calculate classes intervals. |
|
public |
Array of colors to be used by the API. |
|
public |
this member was deprecated. Not used ATM, should probably be used for Heat Maps.
Intensity of a heat map. |
|
public |
When we click on a feature that is on the map, show properties of said Feature or not. |
|
public |
If it is dynamic or not. |
|
public |
this member was deprecated. Currently not in use. Maybe implement later.
Number of decimal numbers to show on the numerical values of the Legend. |
|
public |
Function to be called when the user clicks on a Legend class. |
|
public |
this member was deprecated. Currently not in use. Maybe implement later.
The user defined position of the Legend over the map. |
|
public |
The title to be used on the Legend. |
|
public |
Enable/Disable Legend toggle. |
|
public |
Function to be called when the user clicks on the Map (on a Feature). |
|
public |
The max number of features to be displayed. |
|
public |
The maximum size of the points to be drawn on the Map. |
|
public |
If false each feature will have it's own WebGLBuffer, otherwise the geometry will be grouped creating one WebGLBuffer by Aesthetic class. As the name implies allows memory saving and with this improves performance in lower end devices. Only Available/Relevant to Dot Maps. |
|
public |
The minimum size of the points to be drawn on the Map. |
|
public |
The minimum property of the GeoJSON feature object. |
|
public |
Number of classes to be used on the map Legend. |
|
public |
The number of legend items. |
|
public |
profiling: * ##################### OTHER GLOBAL OPTIONS ############################## |
|
public |
Whether or not to show the map Legend. |
|
public |
Whether to show or not the loader when we the API is loading the needed data. |
|
public |
Properties and description to be shown when the user clicks on a Feature. |
|
public |
If the user wants to specify the size of the dots on a PSymbols Map using classes, this attribute should be true. |
|
public |
The property of the GeoJSON feature object to subtract from the minimum. |
|
public |
The size of each background map tile. |
|
public |
True when the user wants to use another background map service than those who are supported by default by the API. |
Method Summary
Public Methods | ||
public |
Returns the available class break methods. |
Public Constructors
public constructor(userOptions: Object) source
Creates a new Options object. User options take precedence over default options.
Params:
Name | Type | Attribute | Description |
userOptions | Object | The user defined options. |
|
userOptions.attr | string | The attribute to be mapped. |
|
userOptions.colorScheme | string[] |
|
The color scheme to be used. |
userOptions.numberOfClasses | number |
|
Number of classes to be used on the map Legend. |
userOptions.classBreaksMethod | string |
|
Algorithm to be used by the API to calculate classes intervals. |
userOptions.classBreaks | number[] |
|
Class intervals. |
userOptions.interactive | boolean |
|
Show pop-up when the user clicks on a Feature. |
userOptions.showPropertiesOnClick | boolean |
|
Show pop-up when the user clicks on a Feature. |
userOptions.showLegend | boolean |
|
Show map Legend. |
userOptions.minuend | string |
|
The minimum property of the GeoJSON feature object. |
userOptions.subtrahend | string |
|
The property to subtract from minuend. |
userOptions.legendTitle | string |
|
Legend title for the Legend. |
userOptions.showLoader | boolean |
|
Show loader when loading data. |
userOptions.useCustomMapService | boolean |
|
Use custom map service. |
userOptions.minPointSize | number |
|
Minimum point size. |
userOptions.maxPointSize | number |
|
Maximum point size. |
userOptions.sizeByClass | boolean |
|
Specify the size of the dots on a PSymbols Map using classes. |
userOptions.memorySaver | boolean |
|
Save memory on Dot Maps. |
userOptions.colorSchemeId | boolean |
|
The color scheme id to use. |
userOptions.legendOnClickFunction | Function |
|
Function to be called when the user clicks on a Legend class. |
userOptions.mapOnClickFunction | Function |
|
Function to be called when the user clicks on the Map (on a Feature). |
userOptions.alpha | number |
|
Alpha to be used in WebGL. |
userOptions.maxFeatures | number |
|
The max number of features to be displayed. |
userOptions.numberOfLegendItems | number |
|
The number of Legend items (Used on PSymbols Map). |
userOptions.intensity | number |
|
Intensity for Heat Map. |
userOptions.legendPosition | string |
|
The Legend position(br=bottom right). |
userOptions.legendNumberFormat | number |
|
Number of decimal numbers to show on the numerical values of the Legend. |
userOptions.tileSize | number |
|
Size of each background map tile. |
Public Members
public alpha: number source
Alpha to be used in WebGL. 0 means fully transparent <-> 1 fully opaque.
public classBreaks: number[] source
Class intervals. If this is defined then numberOfClasses and classBreakMethod are ignored.
public classBreaksMethod: string source
Algorithm to be used by the API to calculate classes intervals. Defaults to quantile if the user does not provide any or if it provides one that isn't on the list of available algorithms. Available options are 'quantile', 'equidistant', 'k-means'.
public intensity: number source
Intensity of a heat map. Higher values of intensity means more red in the end color. Otherwise more green.
public interactive: boolean source
When we click on a feature that is on the map, show properties of said Feature or not.
public isDynamic: boolean source
If it is dynamic or not. When dynamic is set to true it will join all Features on one Aesthetic class in the same Feature and this way it can draw all elements at once. It's the inverse of the memorySaver value.
public legendNumberFormat: number source
Number of decimal numbers to show on the numerical values of the Legend.
public legendOnClickFunction: Function source
Function to be called when the user clicks on a Legend class. This function should receive an object of type Aesthetic.
public legendPosition: string source
The user defined position of the Legend over the map. Allowed positions tl, tr, bl, br.
public legendTitle: string source
The title to be used on the Legend. Third option is used for Change Map.
public mapOnClickFunction: Function source
Function to be called when the user clicks on the Map (on a Feature). This function should receive an array, which are the Feature properties.
public maxFeatures: number source
The max number of features to be displayed. If not given by the user then it is the maximum numnber allowed. Number.MAX_VALUE = 1.79E+308
public maxPointSize: number source
The maximum size of the points to be drawn on the Map. Will be used on PSymbols. The dot with highest value on the features will have the size given by the user.
public memorySaver: boolean source
If false each feature will have it's own WebGLBuffer, otherwise the geometry will be grouped creating one WebGLBuffer by Aesthetic class. As the name implies allows memory saving and with this improves performance in lower end devices. Only Available/Relevant to Dot Maps.
public minPointSize: number source
The minimum size of the points to be drawn on the Map. Will be used on PSymbols and maybe on Dot Map/Heat Map.
public minuend: string source
The minimum property of the GeoJSON feature object. Used on Change Map.
public numberOfClasses: * source
Number of classes to be used on the map Legend. This option should be used when the user wants the API to calculate the classes (aka ranges) using the given number. Otherwise the API will calculate the appropriate number of classes to use. @type{number}
public profiling: * source
##################### OTHER GLOBAL OPTIONS ##############################
public showLoader: boolean source
Whether to show or not the loader when we the API is loading the needed data.
public showPropertiesOnClick: string[] source
Properties and description to be shown when the user clicks on a Feature.
Test:
TODO:
- NOT USED?
public sizeByClass: boolean source
If the user wants to specify the size of the dots on a PSymbols Map using classes, this attribute should be true.
public subtrahend: string source
The property of the GeoJSON feature object to subtract from the minimum. Used on Change Map.
public tileSize: number source
The size of each background map tile. Used by most background map providers is 256.