getLayerLegend: function(composedLayer, index) : Array
Get the associated layer legend content by its index. PS: The legend format is the same as expected by the composedLayer.setCalculateLegend function. Usage:this.setCalculateLegend(ExtjsUtils.Layer.getLayerLegend(composedLayer, 0));
@param composedLayer {OpenLayers.Layer.Composed} Layer composed.
@param index {Numeric} Index of the inside layer.
functions: Array|null
Allows to create custom functions on the context of each layer. These functions can be used in any tool callbacks, in the tool callback must use the same name in this 'functions' property.
PS1: Functions only visible inside this layer.
PS2: Functions accessed by tools callbacks using his property name as: (this.functions.['onClick']) to refer the following onClick function:
functions: {
onClick: function() {
ExtjsUtils.ALERTIFY.log("Clicked Button");
}
}
extents: Array
Override the map extents with a custom one. Extents must be in EPSG:4326 (coordinates in lat,long) array: [minX, minY, maxX, maxY] PS: All tiles within area will be requested.
legendColor: function
Function to treat the color associated to each value/category. PS: This function callback is called in layer context.
@param color {Array} Three numbers (0 to 255) to define the RGB color.
@param inputs {Array} Array of widgets.
@param lastValue {String} Last maximum title.
@param currentValue {String} Current maximum title.
@param ruleIndex {Numeric} Rule input index.
onInputsReady: function
Callback function called after all inputs ready and loaded. PS: Its called even when the map is listed but not showing.
@param inputs {Object} Inputs defined to interact with the map.
type: String
Use as data source in any of supported types: 'load', 'csv', 'json' or 'default'. 'load': Function to use as callback on 'loadData' property. The user is responsible for load data directly on layer. 'csv': Url address to load csv file from. 'json': Json data directly itself. 'jsonurl': Url address to load json from
popupCallback: function
Function on popup. on callback param. (attributes, inputs) Scope in layer.
@param attributes {Array} undefined
@param inputs {Array} undefined
styleMap: Object
This attribute allows you to customize the layer visualization. It can be: undefined, a Config Object or an OpenLayers.StyleMap.
toggleHandler: function()
Handler is the callback when the ToggleButton is clicked.
Overwrite to call a custom function.
PS: Using custom function ignore the associatedButtonID "It doesnt have to even exists".
handler: function()
Handler is the callback when the button is clicked.
Overwrite to call a custom function.
PS: Using custom function ignore the associatedButtonID "It doesnt have to even exists".
paramsButtonConfig: Object
Define custom buttons to be shown on the layer representation.
There are multiple types of buttons, there are some commum properties and some special properties:
Commom properties:
{
iconCls: {String} The class to add on the button. Ex: "icon-timeline-slider"
pressed: {Boolean} True to indicate if the button starts pressed, False otherwise. Ex: true,
toggleGroup: {String} Identify a group by name where only one button of the group can be pressed. Ex: 'onlyOneAtTime'
}
Types:
associated: {associatedButtonID: 'ANOTHER_BUTTON_ID', type: 'associated'}
Treat the layer button and the associated as the same button, so no matter which one is clicked both will
receive the click event.
query: {type: 'query'}
This configuration allows the user to change the default query button behavior overriting his definition.
download: {type: 'download', layerIndex: 0}
Set what layer should be downloaded when more than one layer is shown by its internal layer index.
metadata: {type: 'metadata', layerIndex: 0}
Set the metadata button to show one of the inside composite layer by his index.
PS: The layerIndex is from 0 to the quantity of layers in a composed map.
PS2: The properties are aditional, so the common must always be present, and for each type his
corresponding property must be added.
onClickViewGroup: function
Layer configuration to use layer group click callback. PS: Function executed in the node context. PS2: this.expanded True when its openned False otherwise.
otherNames: String
Define adittional maps to be available for the query, wich will be listed in the filtered stored capabilities. PS: This property is to use along with the 'capabilities' option, wich filter the GetCapabilities cache only the maps in use. (Performance Optimization, faster loading).
changeLayers: function(newConfig, force)
Change a internal layer in a given index by another. PS: Its highly recommended to pass multiple configuration in a array, avoid call this function multiple times in the same callback.
@param newConfig {Array|Object} One or more layers configurations with a property 'index' indicating the replacing layer. Each config object must contain at least the following properties: [{name: 'MAP_FULL_NAME', styles: 'MAP_STYLE', index: 'MAP_INDEX_TO_CHANGE'}, ... ]
@param force {Boolean} Force redraw even if no change is done when the layer is the same.
log: function(msg, config)
Shows an user notification (if enabled). PS: The messages before layer loading are delayed, when it finishes only the last message will be shown.
@param msg {String} Notification HTML content.
@param config {Object} Message configuration parameters. {force: {Boolean} Force to show notification even when disabled. func: {Callback} Callback function when the notification is clicked. onlyMsg: {Boolean} True to only show message and hide the close and the stop notifications, False otherwise. delay: {Numeric} Amout of time in milisseconds before the message hide. }
description: Object
Raw Maps operations: 'normal' (NORMAL): A normal map is a map with each cell representing a legend/color and aren't a RAW Maps type. 'raw' (RAW): Each cell in resulting map has the value of ther most centered cell in aggregated region. 'rgba' (RGBA): Each cell in resulting map has a integer value representing the RGBA composition. PS: Tanto o resultado como o input são inteiros representando valores RGBA. 'sum' (SUM): Each resulting cell is the weighted sum of cells in the covering region. PS: The weight used is the proportion of the covered area against the total area of the cell i.e. VALUE * COVERED_PERCENTAGE. 'average' (AVERAGE): Each cell is the resulting of the weighted mean of cell in the covered region. i.e. Sum(A) / Sum(B) : A is CELL_VALUE * COVERED_PROPORTION, B is COVERED_PROPORTION. Example: A full covered cell the COVERED_PROPORTION is 1, and the half covered cell the proportion is 0.5 . 'max' (MAX): Each resulting cell is the greater cell that is at least partially covered in the given region. 'min' (MIN): Each resulting cell is the smaller cell that is at least partially covered in the given region. 'integral' (INTEGRAL): A technique that allows to calculate the sum in a region just inspecting the cells on the boundaries of a retangular area i.e. calculate sum in a region using only 4 points. 'areaintegral' (AREAINTEGRAL): ? 'area' (AREA): Each cell carry the original map area in the aggregated region. ?PS: Esse simplificador agrupa as áreas do mapa original e permite avialiar a área do mapa minimizando erros de calculos de área causados pela reprojeção uma vez q a própria célula armazena esse valor. 'cells' (CELLS): Weighted sum of the cell quantity in a given region.
setQueryGlobalProperties: function(wmsDefinitions, QUERY_DESCRIPTION) : boolean
Function to add custom remote servers.
@param wmsDefinitions {Object} A object with all custom WMS definitions. The object could contain the following properties: *url: {String} Url of the source (Mandatory). ?cors: {Boolean} True to accept (Cross Domain Request Security) CORS for servers without permission, False otherwise. ?updateWMS: {Boolean} True to purge the WMS cache and get the updated content, False otherwise. (Usefull to avoid long waitings) ?storage: {String} Name of the storage service, supported services so far: 'github'. Storage type tips: 'github': The Github contenct directly. 'jsdelivr': The jsDelivr cache the results to force a instantly update the user could use different release version. Tutorial about creating releases: https://help.github.com/en/articles/creating-releases After creating the user could append @VERSION_NUMBER to the URL to force updating the map cache.
@param QUERY_DESCRIPTION {ConfigLayer} Array Array of layers in the query. Usage: ExtjsUtils.QUERY.setQueryGlobalProperties({globalCount: 0}) && QUERY_DESCRIPTION
setQueryGlobalProperties: function(globalProperties, QUERY_DESCRIPTION) : bool
A function that allows to define custom global functions that can be used in order to define properties or even inside the functions callbacks. PS: All properties defined here are added to the global scope and are removed when the query is changed.
@param globalProperties {Object} Object The object that all his functions will became globals, each property can be a value or a object or evan a function.
@param QUERY_DESCRIPTION {ConfigLayer} Array Array of layers in the query. Usage: ExtjsUtils.QUERY.setQueryGlobalProperties({globalCount: 0}) && QUERY_DESCRIPTION
preventClick: Boolean
Set True to disable the interaction of filtering map by clicking at legend, False otherwise.
filterLayers: Array
Array of indexes of layers to be included in map legend (from 0 to quantity of layers).
If not defined, all layer legends are shown. Otherwise only the indexes according to layer are included.
Ex: A composed layer with three maps:
name: "CSR:estados,CSR:roads,CSR:municipalities",
If pass 'filterLayers=[1,2] only the legends of 'CSR:roads' and 'CSR:municipalities' are shown.
description: function(name, config, layer, parameters) : Ext.Container
Create an input of summatory in any arbitrary area. CallBack parameters (context {OpenLayers.Layer}, layersValues {Array[Number]}, inputs {[Object]}, feature {Geometry}) runOnClick {Function} Callback called exactly after sum the map region., PS: 'layersValues' return the sum of each internal layer and an adittional value which is the sum of all pixels of resulting layer.
@param name {String} Input name "summedarea".
@param config {Object} Properties to customize the element.
@param layer {OpenLayers.Layer} Layer which the widget is defined.
@param parameters {Array} Array de parametros antes do processamento para o input.
onBeforeHide: function
Callback function to be called before hiding the floating window.
@param layer {Object} Scope of the layer
@param data {Array} [window, button, windowConfig] window: Window object; button: Button created; windowConfig: Window object configuration
ignoreVisibility: Boolean
Ignore the layer visibility toggle. True to window show or hide ignoring the layer visibility, False otherwise. PS: This 'ignoreVisibility' is not compatible with the 'associatedButtonID' property, when both are used together this value is ignored.
x: Number
Initial absolute X position of the window. PS: Can be overwritten if defined together with 'underButtons' property.
abbreviateNumber: function(value, useFixed, abbreviateNumbers) : String
Auxiliary function to shorten the display of numbers. PS: The number loses a little precision but becomes more meaningful.
@param value {Number} Value to be displayed.
@param useFixed {Number} If set it will limit the number of decimal places, otherwise it will use the default value.
@param abbreviateNumbers {Array} Number suffix name.
onPlayToggle: function
Callback function when the timeline start/stop playing.
@param pressed {Boolean} True if the button was pressed, False otherwise.
@param layer {Object} The layer associated to this timeline.
@param timeline {Object} The timeline associated.
@param playBtn {Object} The button changed.