This is that I want:
Make a render with this layer (barrancabermeja/mapa_tematico_malla_GBD), I added that layer but it includes the sublayers ( ancho calzada (0), tipo de capa de rodadura (1), numero de carriles (2) ).
When I print the operational layers (and other thematic layers too) I see the structure of the layer above, but It doesnt have the fields property. I think that I need the fields to make the renderer. But, I dont know How to get the fields of each sublayer there.
If I add one layer like mapserver/0 (barrancabermeja/mapa_tematico_malla_GBD/0) , and I print that in the console, I can see the fields property, otherwise, not.
Thanks
Solved! Go to Solution.
Robert,
I did as you said. But I cannot understand about 'optionsArray', please, explain me. Why you say 'optionsarray[2]' refers to third layer? What is the purpose of that variable?
Rolando,
Because a ArcGISDynamicMapServiceLayer can have more than one sublayer you are defining which sublayer the layer drawing options is being applied to.
ArcGISDynamicMapServiceLayer | API Reference | ArcGIS API for JavaScript 3.18
Robert,
Let me illustrate it:
Correct?
correct
Robert,
and to make a render for code values, unique value renderer is better?
I'm trying with that but, It's drawing all values with the same color.
Thanks a lot.