Hoverpixel

Hoverpixel

Hoverpixel - View pixel value on Hovering

Hoverpixel - View pixel value on Hovering

Hoverpixel - View pixel value on Hovering

Total burned area (ha)

Total burned area (ha)

A component that combines a button or editable field and a drop-down list. The user can select a value from the drop-down list, which appears at the user’s request. If you make the combo box editable, then the combo box includes an editable field into which the user can type a value.

Usage: “\{\{hoverpixel|id=ANY_UNIQUE_ID|runOnClick={Function}|runOnHover={Function}|args\}\}”

Mappia API

 
 

runOnClick: {Function}({{layer}}, {{layersValue}}, {{inputs}}, {{coordinates}}, {{clickEvt}}, {{lastInfo}}

Fires when a pixel is clicked. CallBack parameters (layer, layersValue, inputs, coordinates, clickEvt, lastInfo)
layer: {Layer} Current layer.
layersValue: {Array} One value for each layer at the given point.
inputs: {Object} Object with all the layer inputs.
coordinates: {Openlayers.LatLon} Coordinate of the click in the map.
clickEvt: {EventObject} Mouse click event.
lastInfo: {click: {LatLon}, hover: {LatLon} } A object with the last click and hover latLon positions.
Usage: onClick=function(){alert('i found a click')}

Defaults to undefined
 

runOnHover: {Function}({{layer}}, {{layersValue}}, {{inputs}}, {{coordinates}}, {{clickEvt}}, {{lastInfo}}

Fires when is hovering a pixel. CallBack parameters (layer, layersValue, inputs, coordinates, clickEvt, lastInfo)
layer: {Layer} Current layer.
layersValue: {Array} One value for each layer at the given point.
inputs: {Object} Object with all the layer inputs.
coordinates: {Openlayers.LatLon} Coordinate of the click in the map.
clickEvt: {EventObject} Mouse click event.
lastInfo: {click: {LatLon}, hover: {LatLon} } A object with the last click and hover latLon positions.
Usage: onClick=function(){alert('i found a click')}

Defaults to undefined
 

functions: {Object}

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");
}
}

Defaults to null
 

CreateTooltipThumb: ({{title}}, {{description}}, {{target}}, {{thumbUrl}}, {{showDelay}})

Create a tooltip which follows the mouse on hovering an element with title, description and thumbnail.

PS: The description content is shown until three break lines in sequence and the rest of the content is thrown away.

@param title {String} Tooltip title.
@param description {String} Tooltip content.
@param target {DOM} DOM object to create the tooltip.
@param thumbUrl {String} URL of the thumbnail.
@param showDelay {Numeric} Define how many seconds until hide the tooltip.
@returns {Ext.ToolTip} Created tooltip with the properties.
Usage: ExtjsUtils.TooltipHelper.CreateTooltipThumb()

Defaults to undefined
 

CreateTooltipOnPosition: ({{title}}, {{contentHtml}}, {{position}}, {{additionalConfig}})

Create a tooltip at a fixed position.

If the position is the mouse event, the tooltip will be at the right side and below the pointer.
If the position is a array[x,y] will anchor the top left at this point.

@param title {String} Tooltip title.
@param contentHtml {String} Tooltip HTML content.
@param position {Event|Array[Number, Number]}} Defines the top left position of the tooltip.
@param additionalConfig {Object} Additional configuration for the tooltip.
@returns {Ext.Tooltip} A tooltip anchored at the given position.
Usage: ExtjsUtils.TooltipHelper.CreateTooltipOnPosition('title', 'My tooltip content', [0, 0])

Defaults to undefined
 

getCmp: ({{objId}}) => {Ext.Component}

Get a Extjs object by his ID.
{{objId}}: The Id which object will be returned.
Usage: Ext.getCmp('myId');

Defaults to undefined
 

operation: {String})

A string that describe the RAW MAPS operations, each operation identifier da must be separated by a comma.
PS: The operations must be one for each defined map.

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.
Exemplo: 'min,max,raw,integral'

Defaults to undefined