AggregateWidget

AggregateWidget

Widget that shows a WPS Aggregate function result

Constructor

new AggregateWidget(config)

Source:
Parameters:
Name Type Description
config Object

Configuration object

Properties
Name Type Attributes Description
title String

Widget title

server String

URL of map server

namespace Object

Namespace object

Properties
Name Type Description
name String

Namespace to use

url String

Namespace URL

layerName String

Name of the layer to query

function String

Aggregate function to execute. Options: 'Count', 'Average', 'Max', 'Median', 'Min', 'StdDev', or 'Sum'

property String

Field to use in aggregate function

format function <optional>

Function to parse and transform data fetched from server. This function should return a human friendly value as it will be shown as the widget current value.

Extends

Methods

(protected) format() → {Object}

Source:
Inherited From:

Processes the widget value and returns a human friendly version.

Returns:
  • Current widget value prepared to be shown
Type
Object

(protected) parseResponse(value)

Source:

Parses data fetched from server and sets widget value to an easily readable format

Parameters:
Name Type Description
value Object

JSON data fetched from server

refresh()

Source:
Inherited From:

Reloads the widget value using the formatted value.