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 a feature is not provided, symbolType` should be specified.
symbolizers
Array(Object) An array of symbolizer objects (in painters order) for rendering a feature. If no symbolizers are provided, the OpenLayers default will be used.
symbolType
String One of "Point", "Line", or "Polygon". If feature is provided, it will be preferred. Default is "Point".

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: