GeoPrisma logo

WFSFilterBuilder

This widget allows you to filter data WFS and display them in a map. This dialogue with the Query Tool is Click to change the selection. You can rewrite the name of columns and search parameters by adding fileds of the same name and set the title element to the name you want to use. Note that you’re not forced to add each fields since by default for each column it will take the wfs name if no title is set.

XML Sample - draw

Sample configuration.

<wfsfilterbuilder>
  <name>WFSFilterBuilder</name>
  <options>
    <vectorlayer>WFSVectorLayer</vectorlayer>
    <queryonclick>QueryOnClick</queryonclick>
    <csvURL>path/to/my/scripts/CSV.php</csvURL>
    <csvTitle>Export a CSV</csvTitle>
    <pdfURL>path/to/my/scripts/PDF.php</pdfURL>
    <pdfTitle>Export a PDF</pdfTitle>
  </options>
</wfsfilterbuilder>

XML Sample - widget to be added to a toolbar

This widget must be added to a GeoExtToolbar widget

<geoexttoolbar>
  <name>GeoExtToolbar</name>
  <options>
  <widgets>
    <widget>WFSFilterBuilder</widget>
    <widget>QueryOnClick</widget>
  </widgets>
  </options>
</geoexttoolbar>

Mandatory Options

N/A

Optional Options

vectorlayer:The name of the layer used for add the results to the map.
queryonclick:The name of QueryOnClick widget. They can exchange the the list of features.
csvURL:(deprecated) The URL called when we click on the button to generate CSV files. The button isn’t showed if this option is empty.
csvTitle:(deprecated) The text on the button to generate CSV.
pdfURL:The URL called when we click on the button to generate PDF files. The button isn’t showed if this option is empty.
pdfTitle:The text on the button to generate PDF.

Service Options

csvOutputFormat:
 (Boolean) If the WFS service has this option set to true, the according resource will enable export to CSV files using WFS.
utf8Decode:(Boolean) Only used when ‘csvOutputFormat’ is set to true. If the WFS service has this option set to true, it will decode the result to iso-latin-1.

Resource Options

noLayer:(Boolean) If set to true, then no ‘zoomTo’ button is added to the result grid.
selectorTemplateMethod:
 (String) If set, adds an action column to the resource result grid used to contain more custom informations about a feature. The content is returned by a method, which is the value to set for this option.
selectorTemplateHeight:
 (Integer) If set, defines the height of the window to open for the custom information (when row action is clicked). Only used when “selectorTemplateMethod” resource option is set.
selectorTemplateWidth:
 (Integer) If set, defines the height of the window to open for the custom information (when row action is clicked). Only used when “selectorTemplateMethod” resource option is set.

Resource Fields

This widget will read any field title parameter set for each resource and use it as column header for the response grid and as the value of the query builder field in the drop down list. This is optional.

Example :

<resource>
  <name>R_GMAP_PARK</name>
  <title>GMap parks</title>
  <datastores>
    <datastore>DS_WMS_DEV4G_GMAP_PARK</datastore>
    <datastore>DS_WFS_DEV4G_GMAP_PARK</datastore>
  </datastores>
  <fields>
    <field>
      <name>NAME_E</name>
      <title>English name</title> <!-- field title -->
    </field>
    <field>
      <name>NAME_F</name>
      <title>French name</title> <!-- field title -->
    </field>
  </fields>
  <widgets>
    <widget>W_MyLayerWMS</widget>
    <widget>QueryOnClick</widget>
    <widget>WFSFilterBuilder</widget>
    <widget>W_MyResultVectorLayer</widget>
  </widgets>
  <options>
    <primaryField>AREA</primaryField>
    <ignoredFields>
      <ignoredField>geometry</ignoredField>
      <ignoredField>AREA</ignoredField>
    </ignoredFields>
  </options>
</resource>

Service Type

wfs

Widget Action

read