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
featLay.layerDetails.drawingInfo.renderer
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.
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;
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;
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.