renderer from an existing service fails to return the full symbology

212
0
08-13-2020 02:18 AM
deleted-user-wcpelUUf_XXx
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:

https://ags.iplan.gov.il/arcgisiplan/rest/services/PlanningPublic/Xplan_2039/MapServer/1 

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?

code:

https://codepen.io/segev-salman/pen/bGpERqG 

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

0 Kudos
0 Replies