renderer from an existing service fails to return the full symbology

08-13-2020 02:18 AM
New Contributor III

i want to use a renderer from an exsisting service for a feature set of the same schema(using add data widget)

service link: 

i used "copy(json.stringify(layer.renderer.toJSON())" in console to get the renderer*

deleting the delimiter attribute that prevented me from seeing the symbology. 

now i get the layer but with only partial symbology:

original symbology in the layernew symbology on add data layer

*I tried getting the renderer with copy(layer.renderer) but it didnt work when i set it. 

the symbology is hardcoded in my code,and now that i have the json i dont request the original service.

is that the reason?

is there a better way to get OGlayer.renderer set as newLayer.renderer?


only additions to the base code is the renderer and the setrenderer plus the requiring of them.

0 Kudos
0 Replies