Build a ExtJS dropdown list from features received from a featureserver service by using the Shortcuts widget from MapFish.
The dropdown list created must be added to a FormPanel container in the template file. See the samples below for a complete example of use.
Warning
This widget is deprecated. You should use the Shortcut widget instead.
Sample configuration with no activation
<shortcut>
<name>W_MyQuickZoom</name>
<options>
<field>hap_nm_top</field>
<emptytext>Zoom to...</emptytext>
</options>
</shortcut>
The QuickZoom widgets must be drawn by calling the drawWidget method and putting the results inside a FormPanel object. Here’s an example of use :
var oMyQuickZoomFormPanel = new Ext.FormPanel({
region: 'center',
border: 'false',
labelWidth: 120,
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 320,
defaults: {width: 150},
defaultType: 'textfield'
});
<xsl:for-each select="/geoprisma/widgets/widget[./type = 'quickzoom']">
oMyQuickZoomFormPanel.add(
<xsl:call-template name="quickzoom:drawWidget">
<xsl:with-param name="pWidgetName" select="./name" />
</xsl:call-template>);
</xsl:for-each>
| field: | The field to be displayed in the combobox. |
|---|---|
| emptytext: | The default text displayed by default when no feature is selected. |
| maxfeatures: | The maximum number of features the request must return. |
|---|---|
| width: | The witdh of the combobox in pixels. Default is 150. |
| listwidth: | The width of the dropdown list in pixels. Default is 150. |
featureserver
read