Sample code showing how to show a scale combobox in your MapPanel toolbar.
Heron.layout = {
xtype: 'hr_mappanel',
hropts: {
layers: [
new OpenLayers.Layer.WMS( "World Map",
"http://tilecache.osgeo.org/wms-c/Basic.py?", {layers: 'basic', format: 'image/png' } )
],
toolbar : [
{type: "scale"},
{type: "-"},
{type: "pan"},
{type: "zoomin"},
{type: "zoomout"}
]
}
};
Configuration properties in addition to those listed for Ext.form.ComboBox.
Number of decimal number for the scale. Default: 0
See http://www.dev.sencha.com/deploy/dev/docs/source/TextField.html#cfg-Ext.form.TextField-emptyText, default value is “Search location in Geozet”.
Array of fake scale value
See http://www.dev.sencha.com/deploy/dev/docs/source/BoxComponent.html#cfg-Ext.BoxComponent-listWidth, default value is 120.
OpenLayers.Map or Object A configured map or a configuration object for the map constructor, required only if zoom is set to value greater than or equal to 0.
The thousand separator string for the scale. Default: ‘
See http://www.dev.sencha.com/deploy/dev/docs/source/BoxComponent.html#cfg-Ext.BoxComponent-width, default value is 240.