var sr:SimpleRenderer = new SimpleRenderer(); var oLine:SimpleLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,0xff0000,0.8,1); sr.symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_BACKWARD_DIAGONAL,0xff000,0.8,oLine); featureLayer.renderer = sr;
Bruno,
Simply define one in code and assign it to the feature layer.var sr:SimpleRenderer = new SimpleRenderer(); var oLine:SimpleLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,0xff0000,0.8,1); sr.symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_BACKWARD_DIAGONAL,0xff000,0.8,oLine); featureLayer.renderer = sr;
Bruno,
Since the renderer is null I guess you would have to get the first feature from the feature layer and then get the symbol from the graphic and get all the way down to the simpleFillSymbol's color property. I don't have any code examples for this.
featLay.layerDetails.drawingInfo.renderer
Bruno,
You can get the renderer from the drawingInfo. Make sure that the layer is loaded first though by calling this line after the featureLayer.load eventfeatLay.layerDetails.drawingInfo.renderer