- Extends
-
- xtype
- gx_renderer
-
class GeoExt.FeatureRenderer(config)
- Create a box component for rendering a vector feature.
Config Options
Configuration properties in addition to
those listed for Ext.BoxComponent.
-
feature
- OpenLayers.Feature.Vector
Optional vector to be drawn. If not provided, and if symbolizers
is configured with an array of plain symbolizer objects, symbolType
should be configured.
-
symbolizers
- Array(Object)
An array of OpenLayers.Symbolizer instances or plain symbolizer
objects (in painters order) for rendering a feature. If no
symbolizers are provided, the OpenLayers default will be used. If a
symbolizer is an instance of OpenLayers.Symbolizer, its type will
override the symbolType for rendering.
-
symbolType
- String
One of "Point", "Line", or "Polygon". Only pertinent if
OpenLayers.Symbolizer objects are not used. If feature
is provided, it will be preferred. The default is “Polygon”.
Public Methods
Public methods in addition to those
listed for Ext.BoxComponent.
-
FeatureRenderer.setFeature()
Parameters: |
- feature – OpenLayers.Feature.Vector The feature to be rendered.
If none is provided, one will be created based on symbolType.
- options – Object
|
Update the feature and redraw.
Valid options:
- draw - Boolean Draw the feature after setting it. Default is true.
-
FeatureRenderer.setSymbolizers()
Parameters: |
- symbolizers – Array(Object) An array of symbolizers
- options – Object
|
Update the symbolizers used to render the feature.
Valid options:
- draw - Boolean Draw the feature after setting it. Default is true.
-
FeatureRenderer.setSymbolType()
Parameters: |
- type – String One of the symbolType strings.
- options – Object
|
Create a new feature based on the geometry type and render it.
Valid options:
- draw - Boolean Draw the feature after setting it. Default is true.
-
FeatureRenderer.update()
Parameter: | options – Object Object with properties to be updated. |
Update the symbolType or feature and symbolizer and redraw
the feature.
Valid options:
Events
Events in addition to those
listed for Ext.BoxComponent.
-
click
Fires when the feature is clicked on.
Listener arguments: