cgxp.plugins.FloorSlider

ptype
cgxp_floorslider
class cgxp.plugins.FloorSlider(config)

Example Use

Sample code showing how to add a FloorSlider plugin to a gxp.Viewer:

new gxp.Viewer({
    ...
    tools: [{
        ptype: 'cgxp_floorslider',
        minValue: -2,
        maxValue: 4
    }]
    ...
});

When the floor is changed if it exists setFloor(floor) is called on OpenLayers layers, or a floor parameter is changed for layers with parameters (WMS and WMTS).

Mapserver layers should be ready to receive a floor parameters in the query string, then add the following code in the where close of your query (your table should have a floor column):

(floor = %floor% OR %floor% IS NULL OR floor IS NULL) AND ...

and add in the METADATA section:

"default_floor" "NULL"
"floor_validation_pattern" "^-?[0-9]$"

Config Options

Configuration properties.

floors

Array The optional list of floor names (will be computed if not provided)

maxIsSky

Boolean If set to true the label for the slider’s max value will be the value of the skyText config option, and no floor param will be set in the query string of requests. Default is true.

maxValue

Number The max floor value.

minValue

Number The fist floor value.

value

Number The default floor value, default is 0.

widgetOptions

Object Additional slider options. See CGXP.FloorSlider.

Table Of Contents

Previous topic

cgxp.plugins.FeaturesWindow

Next topic

cgxp.plugins.FullTextSearch

This Page

Fork me on GitHub