Select to view content in your preferred language

How to make a render with a group layer (for a thematic classifier)

2222
14
Jump to solution
11-26-2016 08:25 AM
RolandoFlorez
New Contributor III

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

0 Kudos
14 Replies
RolandoFlorez
New Contributor III

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?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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 

0 Kudos
RolandoFlorez
New Contributor III

Robert,

Let me illustrate it:

Correct?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

correct

RolandoFlorez
New Contributor III

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. 

0 Kudos