AnsweredAssumed Answered

MapImageLayer Sublayers Renderer

Question asked by matt.thery on Aug 28, 2018
Latest reply on Sep 28, 2018 by matt.thery

Can you use a Unique Value Renderer function for a MapImageLayer sublayer? 

When I try using an existing field name as a string it works, but when I try to set up a function like in the api documentation I get the error:


[esri.renderers.UniqueValueRenderer] .field: cannot write field to JSON since it's not a string value


The code I am using:

function test(feature){
var renderer = {
type: "unique-value", // autocasts as new UniqueValueRenderer()
field: test,


Is there a way to make it work?