How can I get the symbol from a FeatureLayer?
I want to use the symbol of a FeatureLayer to symbolize a graphic layer.


2 Answers 2


in 4.x of our ArcGIS API for JavaScript, its as easy as checking FeatureLayer.renderer.

in 3.x, besides looping through individual graphics, you can also find the renderer documented in the service metadata.

  "url": serviceUrl,
  "content": {
    "f": "json"
  "callbackParamName": "callback"
  then(function (evt) {

live sample: https://dl.dropboxusercontent.com/u/59331579/js/fl-renderer.html


If your FeatureLayer uses a SimpleRenderer, you may access its symbol with myFeatureLayer.renderer.symbol.

If not, you have to check the symbol per Graphic. You can either ask its Renderer about the symbol with the getSymbol() method, or you can iterate over the array of graphics and get the symbol for each one:

var symbols = []
myFeatureLayer.graphics.forEach(function (g) {

If all your graphics have the same symbol, you can grab the first one:

var mySymbol = myFeatureLayer.graphics[0].symbol

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.