Map publishing customization

Map publishing customization

Example of map publishing using layout created in QGIS.

Mappia API


setQueryGlobalProperties: {Function}({{globalProperties}}) && {{QUERY_DESCRIPTION}}

A function that allows to define custom global functions that can be used in order to define properties or even inside the functions callbacks.
globalProperties: {Object} The object that all his functions will became globals, each property can be a value or a object or evan a function.
PS: All properties defined here are added to the global scope and are removed when the query is changed.
@param QUERY_DESCRIPTION {Array{ConfigLayer} } Array of layers in the query.
Usage: ExtjsUtils.QUERY.setQueryGlobalProperties({globalCount: 0}) && QUERY_DESCRIPTION

Defaults to undefined

nextStepInterval: {Numeric}

Sets the delay in seconds between steps when timeline is playing.
Usage: |nextStepInterval={Numeric}|

Defaults to undefined

steps: {Array{Array} }

Array of all timeline steps where each element is a tuple of [VALUE,'Title']. The value is a mandatory parameter for the step, the title give a optional custom representation to value.
Usage: |steps=[[1918, 'World War 1'], [1939, 'World War 2']]|

Defaults to undefined

plugins.tip: {String}

Shows a tooltip with any html content with the value while dragging.
Usage: |plugins=tip=Filter {0}% of total cells|

Defaults to undefined

minValue: {Numeric}

Defines the minimum acceptable value to slider.
Usage: |minValue=0|

Defaults to undefined

maxValue: {Numeric}

Defines the maximum acceptable value to slider.
Usage: |maxValue=0|

Defaults to undefined

value: {Numeric}

Defines the initial value to slider with only one thumb.
Usage: |value=0|

Defaults to undefined

values: {Array}

Property to use two or more thumbs, each value is the initial thumb value
@type {Array} Array of initial values.
Usage: |values=[0,100]|

Defaults to undefined

backgroundColors: {Array}

Array of colors of background slider values, to define background slider color based in slider value.
The values are defined from most to minimum with two properties each:
- color: {String} CSS color definition for the current interval. i.e. 'red','black','#FF0000', '#000000'.
- startValue: {Numeric} If defined define the initial value which above will apply this color, otherwise use theminimum slider value as default.

backgroundColors: [
// Define background color to red when slider has value above 75.
color: "red",
startValue: 75
// Define background color starting from value 0.
// That results two intervals, from 0 to 75 as blue, and from 76 to 100 as red.
color: "blue",
startValue: 0
Usage: |backgroundColors=[{color:'red',startValue:75},{color:'blue'}]|

Defaults to undefined

visibility: {Boolean}

Define the layer as initial visibility, True to start visible False otherwise. (the URL parameter visibleLayers can override this value).
Usage: {visibility: false}

Defaults to true

hideLegendButton: {Boolean}

Set the 'show legend' button visibility, True to hide button or False to keep it visible.
Usage: {hideLegendButton:true}

Defaults to false

getValue: {Function}({{column}}, {{line}}) => {String}

Get a value by the matrix index and column.
@param column {Number} Column index (First index is 0).
@param line {Number} Line index (First index is 0).
@return {String} Get the cell value.

Defaults to undefined

columnNameToInd: {Function}({{columnName}}) => {Numeric}

Get the index of a column with the 'columnName' name.
@param columnName {String} Column name to search for.
@return {Number} When it exists returns the column index, otherwise -1.

Defaults to undefined

setValue: {function}({{column}}, {{line}}, {{value}})

Change a cell value by its cell index.

@param column {Numeric} Column index.
@param line {Numeric} Line index to change (ignore the header information when it exists).
@param value {*} New value to replace the older value.
Usage:['loadjson'].setValue(2,2, 'myValue')

Defaults to undefined

getLines: {Function}({{columns}}, {{values}}, {{includeHeader}})

Get all lines that 'column' has the value equals to 'value'.

PS: To use the 'column' as index, it must be numeric, when the 'column' is a text the index is searched on header by its name.
PS: To filter multiple column each value and index one must be added to the 'columns' and 'values' arrays.

@param columns {Array} (Optional) Array of indexes/names of the filtered columns.
@param values {Array} {Opcional) Array of values to match each column.
@returns {Array} If the parameters 'column' and 'value' aren't defined return all lines, otherwise returns only the matched lines.
Usage: (['id'].getLines([1,2,4], [20, 'blue', false], false);)

Defaults to undefined