forked from geosolutions-it/MapStore
-
Notifications
You must be signed in to change notification settings - Fork 0
BBOXQueryForm Plugin
amarong edited this page May 27, 2013
·
10 revisions
In order to use the BBOXQueryForm plugin in MapStore you need to be sure that the files below are included in the buildjs.cfg file:
openlayers-ext/lib/OpenLayers/Control/SetBox.js
gxp/src/script/widgets/form/BBOXFieldset.js
gxp/src/script/widgets/FilterBuilder.js
gxp/src/script/plugins/QueryForm.js
NOTE: In the default configuration this is already done.
##Plugin Description
The BBOX Query Form plugin allows performing queries on feature layers. Using this plugin you can create alphanumeric queries on feature attributes and/or spatial query on a specific region of interest.
##Configuration Example
Besides the plugin configuration, the following script import must be uncommented in the composer.html file:
<!-- Externals OpenLayers libraries to manage WPS processes -->
<script type="text/javascript" src="script/OpenLayersExt.js"></script>
Then you have to specify a valid plugin configuration, such as:
{
"ptype": "gxp_bboxqueryform",
"featureManager": "featuremanager",
"outputTarget": "east",
"actions": null,
"id": "bboxquery",
"outputConfig":{
"outputSRS": "EPSG:900913",
"selectStyle":{
"strokeColor": "#FF0000",
"handlerFillColor": "#FFFFFF",
"fillColor": "#FFFFFF",
"fillOpacity":0,
"strokeWidth":2
},
"spatialFilterOptions": {
"lonMax": 7071444.07339,
"lonMin": -3025581.61356,
"latMax": 11641505.29587,
"latMin": 3188181.46493
}
}
}
-
ptype
: ptype of the plugin -
featureManager
: The id of the :class:gxp.plugins.FeatureManager
to use with this tool -
outputTarget
: plugin identifier -
actions
: By default, this tool creates a "Query" action to trigger the output of this tool's form. Set to null if you want to include the form permanently in your layout. -
id
: plugin identifier -
outputConfig
: specific configuration for the BBOXFieldSet widget-
layerName
: name of the layer to use for the box selection (default AOI) -
decimalPrecision
: number of decimal digits used for coordinates (default 5) -
outputSRS
: coordinate system EPSG code to use for output coordinates (default EPSG:4326) -
infoSRS
: flag, display the coordinate system used, with a link to the coordinate system description -
infoEPSGURL
: link to the coordinate system description page (default null) -
epsgWinWidth
: width of the popup window for the coordinate system description (default null) -
epsgWinHeight
: height of the popup window for the coordinate system description (default null) -
spatialFilterOptions
: object with spatial limits for the AOI selection (lonMax, lonMin, latMax, latMin) -
displayAOIInLayerSwitcher
: displays the box selection layer in display switcher (default false) -
selectStyle
: OpenLayers style object for the box selection layer :class:OpenLayers.StyleMap
-