GeoExt

Table Of Contents

Previous topic

GeoExt.Action

Next topic

GeoExt.LayerLegend

GeoExt.FeatureRenderer

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:
  • featureOpenLayers.Feature.Vector The feature to be rendered. If none is provided, one will be created based on symbolType.
  • optionsObject

Update the feature and redraw.

Valid options:

  • draw - Boolean Draw the feature after setting it. Default is true.
FeatureRenderer.setSymbolizers()
Parameters:
  • symbolizersArray(Object) An array of symbolizers
  • optionsObject

Update the symbolizers used to render the feature.

Valid options:

  • draw - Boolean Draw the feature after setting it. Default is true.
FeatureRenderer.setSymbolType()
Parameters:
  • typeString One of the symbolType strings.
  • optionsObject

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:optionsObject Object with properties to be updated.

Update the symbolType or feature and symbolizer and redraw the feature.

Valid options:

  • feature - OpenLayers.Feature.Vector The new or updated feature.

    If provided, the feature gets precedence over symbolType.

  • symbolType - String One of the allowed symbolType values.

  • symbolizers - Array(Object) An array of symbolizer objects.

Events

Events in addition to those listed for Ext.BoxComponent.

click

Fires when the feature is clicked on.

Listener arguments: