An app I'm developing needs to handcraft ESRI JSON to display simple polygons in ArcMap Desktop upon import. I want to specify color/transparency/outlining for the polygons in a layer and ideally different colors for different polygons. (The app does not have access to APIs for this, so it's all done the hard way.)

I've found no documentation for handcrafted JSON but got a few ideas from looking at JSON (Server) examples on the Net, for example drawingInfo/renderer, but haven't been able to get this working. (Maybe drawingInfo is supported by Server but not by Desktop?). I've tried a renderer of type "uniqueValue" without success and have fallen back to trying a renderer of type "simple".

Below, based largely on guesswork, is my attempt. On import into ArcCatalog/ArcMap 10.4, the polygon is displayed but the attempt to specify color and outline was ignored.

 "drawingInfo": {
  "renderer": {
   "type": "simple",
   "symbol": {
      "type": "esriSFS",
      "style": "esriSFSSolid",
      "color": [
      "outline": {
       "type": "esriSLS",
       "style": "esriSLSSolid",
       "color": [
       "width": 0.4
  • I also have an ArcPy script to import the Json file. Possibly the easiest is to handle things there? Will research that.
    – BillF
    Commented Mar 2, 2016 at 4:57
  • Does anyone think it 'looks like it should work'? If so, could be a 10.4 issue? Haven't tried it on 10.3.
    – BillF
    Commented Mar 2, 2016 at 21:37

1 Answer 1


While I couldn't solve this in JSON, I did get a reasonable solution by modifying my ArcPy script that imports the JSON.

First I created a .lyr file containing the polygon symbology with desired colour and outlining. Trying to set transparency here did not stick.

In my python script I used code similar to the following. Transparency needed to be set in two places for it to work.

        tempLayerName = outputFeatureName
        targetGroupLayer = arcpy.mapping.ListLayers ( mxd, groupLayerName, dataFrame ) [ 0 ]
        arcpy.MakeFeatureLayer_management ( os.path.join ( geodatabase, outputFeatureName ), tempLayerName )
        tempAddedLayer = arcpy.mapping.Layer ( tempLayerName )
        if groupLayerName == "Areas":
            tempAddedLayer.transparency = 50
        sourceLayer = arcpy.mapping.Layer( layerFilespec ) # Filespec of .lyr file
        if groupLayerName == "Areas":
            sourceLayer.transparency = 50
        arcpy.mapping.UpdateLayer( dataFrame, tempAddedLayer, sourceLayer, True )
        arcpy.mapping.AddLayerToGroup( dataFrame, targetGroupLayer, tempAddedLayer, "AUTO_ARRANGE" )

An interesting post that might also have helped is: How to apply the four colors theorem in a polygon map in ArcGIS/ArcToolBox automatcally?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.