Class: Statistic

ol.layer. Statistic

Layer with statitic symbolization The layer is a layer group with a vector layer or a heatmap


new Statistic(options)

Parameters:
Name Type Description
options Onject
Properties
Name Type Argument Default Description
source ol.source.Vector | undefined <optional>

layer vector source

sort bool <optional>
true

sort values (categorie)

typeGeom <optional>

Geometry type to use

Source:
layer/Statistic.js
Fires:
  • stat:start
  • stat:end

Extends

  • ol_layer_Group

Members


<static> mode

Statistic modes

Source:
layer/Statistic.js

<static> paramList

List of statistic param

Source:
layer/Statistic.js

<static> type

List of statistic types

Source:
layer/Statistic.js

Methods


addFilter(filter)

Add a filter to a VectorLayer

Parameters:
Name Type Description
filter ol/filter
Source:
layer/Statistic.js

getLimits()

Get class limits

Source:
layer/Statistic.js
Returns:
Type
Array.<number>

getMode()

Get statistic mode mode

Source:
layer/Statistic.js
Returns:
Type
string

getPopupContent(f)

Get popupcontent for a feature

Parameters:
Name Type Description
f ol.Feature | undefined

the feature to get information on, if undefined get the popupcontent of the layer

Source:
layer/Statistic.js
Returns:

popupcontent

Type
html

getSource()

Get vector source

Source:
layer/Statistic.js
Returns:

ol.source.Vector


getStatistic()

Get current statistic params

Source:
layer/Statistic.js
Returns:

statistic params

Type
statisticParam

getStatLegend()

Get legend based on layer statistics

Source:
layer/Statistic.js
Returns:
Type
Array.<LegendItem>

getValues()

Get values used for statistics

Source:
layer/Statistic.js
Returns:
Type
Array.<number>

getVectorStyle()

Convert to an ol_layer_VectorStyle layer returns false if none (heatmap, sectoriel)

Source:
layer/Statistic.js
Returns:
Type
ol_layer_VectorStyle | false

isGeom(type)

Get layer type geom

Parameters:
Name Type Description
type Point | Polygon | Line

of geom

Source:
layer/Statistic.js
Returns:
Type
bool

limits(stat, data)

Calculate classification limits

Parameters:
Name Type Description
stat Object
data Array.<number>
Source:
layer/Statistic.js
See:

removeFilter(filter)

Remove a filter to a VectorLayer

Parameters:
Name Type Description
filter ol/filter
Source:
layer/Statistic.js

selectable( [selectable])

Check if layer is selectable

Parameters:
Name Type Argument Description
selectable boolean <optional>

if define set selectable, default only test selection is enabled

Source:
layer/Statistic.js
Returns:
Type
boolean

setComposite(set)

Set composite operation

Parameters:
Name Type Description
set boolean

or not

Source:
layer/Statistic.js

setPopupContent(default, content)

Set popupcontent for a feature

Parameters:
Name Type Description
default

set the poupcontent of the layer

content string
Source:
layer/Statistic.js

setStatistic(stat)

Calcul des statistiques pour le layer

Parameters:
Name Type Description
stat statisticParam

statistic to apply

Source:
layer/Statistic.js
Returns:

delay to delay calculation (to show a popup) and trigger a stat:start

Type
number