This repository has been archived by the owner on May 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Feature Grid Plugin
Riccardo Mari edited this page Jul 9, 2013
·
23 revisions
In order to use the FeatureGrid plugin in MapStore you need to be sure that the files below are included in the buildjs.cfg file:
gxp/src/script/plugins/FeatureManager.js
gxp/src/script/plugins/ClickableFeatures.js
gxp/src/script/widgets/grid/FeatureGrid.js
gxp/src/script/plugins/FeatureGrid.js
in addition to those required for BBOX QueryForm
NOTE: In the default configuration this is already done.
##Plugin Description
Plugin for displaying vector features in a grid
##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:
...
"customPanels":[
...
{
"xtype": "panel",
"title": "FeatureGrid",
"border": false,
"id": "south",
"region": "south",
"layout": "fit",
"height": 330,
"collapsed": false,
"collapsible": true,
"header": true
},
{
"xtype": "panel",
"title": "Query Panel",
"border": false,
"id": "east",
"width": 400,
"height": 500,
"region": "east",
"layout": "fit",
"collapsed": false,
"collapsible": true,
"header": true
}
...
],
...
"customTools":[
...
{
"ptype": "gxp_featuremanager",
"id": "featuremanager"
}, {
"ptype": "gxp_featuregrid",
"featureManager": "featuremanager",
"outputConfig": {
"id": "featuregrid",
"title": "Features"
},
"outputTarget": "south",
"showExportCSV": true
}, {
"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
}
}
}
...
]
...
-
"ptype"
: ptype of the plugin -
"featureManager"
: The id of the :class:gxp.plugins.FeatureManager
to use with this tool -
"outputConfig"
:-
"id"
: id of the plugin -
"title"
: title of grid panel
-
-
"outputTarget"
: id of the panel where this grid is added -
"showExportCSV"
: set to true to enable grid data in CSV format
This plugin requires that the viewer is configured as Ext.TabPanel