...
The client UI for the filtering contains a couple of new controls that were not previously available with other input forms, the slider and multi-slider. These controls are useful for layer filtering because they provide an easier way to constrain a numeric value to a certain range but . But they’re also different in that they force a value to have to be chosen, that is a filter the that uses a slider for a value will always have that value applied when displaying the layer, which . This can be important when the table behind the layer contains a number of “sets” of data but only one should be displayed at a time, and the column behind the parameter is used to separate out the data into the various sets, for . A example , of this could be the year when the data in the table was generated and the user would only want to see a single year at a time, or for a layer with flood levels and you only want to show a single depth.
In addition to the filter panel, there is also a ToC panel right-click context menu item, weave.toc.filterLayer
, that . This can be added to the ToC panel context menu to allow the user to filter a layer directly. It’s recommended that the layer filtering capability is provided either in the filter panel or context menu in a client and not both (as providing both could result in synchroisation is
item be used at one time.
...
Code Block | ||
---|---|---|
| ||
<!-- parameter examples --> <!-- a parameter representing a floating point value between 2.5 and 26 with an increment of 0.5 and default value of 13 --> <parameter id="level"> <label>Level (m)</label> <controlType>slider</controlType> <dataType>float</dataType> <column>Level_mGH</column> <minValue>2.5</minValue> <maxValue>26</maxValue> <value>13</value> <increment>0.5</increment> <decimalPrecision>1</decimalPrecision> </parameter> <!-- a parameter representing an integer value between 2011 and 2019 inclusive with a default minimum of 2015 and default maximum of 2018 --> <parameter id="study_year"> <label>Study Year</label> <controlType>multislider</controlType> <dataType>int</dataType> <column>Study_year</column> <minValue>2011</minValue> <maxValue>2019</maxValue> <leftValue>2015</leftValue> <rightValue>2018</rightValue> </parameter> <!-- multiple grouped check boxes. Note in this case all checked boxes start as checked but if none of the check boxes are checked all items would be displayed as well --> <parameter id="location"> <label>Location</label> <controlType>multicheck</controlType> <column>Location</column> <dataType>string</dataType> <list label="Catchment, Todd" value="Todd Catchment" checked="true"/> <list label="River, Adelaide" value="Adelaide River" checked="true"/> <list label="River, McArthur" value="McArthur River" checked="true"/> </parameter> <!-- single check box. Note in thethis case since we've set a different true value when this check box is checked the filter applied will be "Location='Adelaide River'" rather than "Location=true" as would be the case if trueValue were nonot set --> <parameter id="location"> <label>Adelaide River Only</label> <controlType>check</controlType> <column>Location</column> <dataType>string</dataType> <trueValue>Adelaide River</trueValue> </parameter> <!-- radio button --> <parameter id="location"> <label>Location</label> <controlType>radio</controlType> <column>Location</column> <dataType>string</dataType> <value>Adelaide River</value> <list label="Catchment, Todd" value="Todd Catchment"/> <list label="River, Adelaide" value="Adelaide River"/> <list label="River, McArthur" value="McArthur River"/> </parameter> <!-- list box --> <parameter id="location"> <label>Location</label> <controlType>list</controlType> <dataSet>locations</dataSet> <column>Location</column> <dataType>string</dataType> </parameter> <!-- a basic text box. Note this format is discuorageddiscouraged as the user has no way of knowing if the value they're entering is valid and may result in nothing being displayed --> <parameter id="location"> <label>Location</label> <controlType>text</controlType> <column>Location</column> <dataType>string</dataType> </parameter> |
...
Code Block | ||
---|---|---|
| ||
<client:config id="filtering"> <title>Example Filtering client</title> <!-- other config here --> <view id="weave.layerFilter"> <location>east</location> </view> <!-- other config here --> <view id="com.cohga.html.client.map.tocView"> <location>west</location> <label>Layers</label> <showFilterIcon>true</showFilterIcon> <contextmenu> <item action="weave.toc.filterLayer"/> </contextmenu> </view> </client:config> |