Skip to main content

UpdateGraphicsLayer - How to use the JSON Renderer

Comments

3 comments

  • Nico Burgerhart
    This? ESRI.ArcGIS.Client.Renderer.FromJson("{'type': 'esriSFS','color': [168,0,0,64],'outline': {'type': 'esriSLS','color': [115,0,0,255],'width': 2,'style': 'esriSLSSolid' },'style': 'esriSFSSolid'}")

     

     
    0
  • Sean McClurkan
    It compiles, but it doesn't render anything.
    0
  • Permanently deleted user
    Hi Sean,

     

    you can try this instead:

     

    ESRI.ArcGIS.Client.Renderer.FromJson("{'type':'simple','symbol':{'type': 'esriSFS','color': [168,0,0,64],'outline': {'type': 'esriSLS','color': [115,0,0,255],'width': 2,'style': 'esriSLSSolid' },'style': 'esriSFSSolid'}}")

     

    It is quite finicky. The 'type' needs to be specified - in this case 'simple'. Also, the items are in single quotes as the double quotes are used for ESRI.ArcGIS.Client.Renderer.FromJson(".. 

     

    I hope that works,

     

    Marion.

     

     
    0

Please sign in to leave a comment.