Select to view content in your preferred language

Outline of polygon patch symbol not showing in print service pdf result

412
0
08-01-2022 01:09 PM
JamesCrandall
MVP Alum

Super generic, I know but thought I'd see if anyone has run into this. 

 

We have a custom print service that use .mxd source templates (v10.8.1) and a custom widget that prepares the webmap_as_JSON input parameter.  The mxd has an empty legend associated with the data frame and all seems to work except for 1 minor issue: the polygon patch in the legend does not print the outline, only the fill shows up.

 

JamesCrandall_0-1659384468039.png

 

Before I get too deep into posting code, just wondering if anyone has run into this!

 

Thanks,

j

 

Here's the execute task's Web_Map_As_JSON parameter in the request to the print service.  It's the "Selected Applications" that should be one I'm interested in:

 

{
  "mapOptions": {
    "showAttribution": true,
    "extent": {
      "xmin": -8979745.169338416,
      "ymin": 3157283.911112111,
      "xmax": -8943055.395761583,
      "ymax": 3175189.284987889,
      "spatialReference": {
        "wkid": 102100,
        "latestWkid": 3857
      }
    },
    "spatialReference": {
      "wkid": 102100,
      "latestWkid": 3857
    },
    "scale": 72223.819286
  },
  "operationalLayers": [
    {
      "id": "layer3",
      "title": "layer3",
      "opacity": 1,
      "minScale": 0,
      "maxScale": 0,
      "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
    },
    {
      "id": "layer2",
      "title": "layer2",
      "opacity": 1,
      "minScale": 0,
      "maxScale": 0,
      "url": "https://blahblahblah/Transportation/MapServer"
    },
    {
      "id": "Selected Application",
      "opacity": 1,
      "minScale": 0,
      "maxScale": 0,
      "featureCollection": {
        "layers": [
          {
            "layerDefinition": {
              "name": "Selected Application",
              "geometryType": "esriGeometryPolygon",
              "drawingInfo": {
                "renderer": {
                  "type": "simple",
                  "label": "Application",
                  "symbol": {
                    "color": [
                      255,
                      170,
                      0,
                      255
                    ],
                    "outline": {
                      "color": [
                        255,
                        170,
                        0,
                        255
                      ],
                      "width": 1.875,
                      "type": "esriSLS",
                      "style": "esriSLSSolid"
                    },
                    "type": "esriSFS",
                    "style": "esriSFSBackwardDiagonal"
                  }
                }
              }
            },
            "featureSet": {
              "geometryType": "esriGeometryPolygon",
              "features": [
                {
                  "geometry": {
                    "rings": [
                      [
                        [
                          -8961855.5314,
                          3165742.8092
                        ],
                        [
                          -8961856.1841,
                          3164886.830600001
                        ],
                        [
                          -8961855.5314,
                          3165742.8092
                        ]
                      ],
                      [
                        [
                          -8960040.978,
                          3170422.6761999987
                        ],
                        [
                          -8960040.7589,
                          3170422.4426000006
                        ],
                        [
                          -8960040.978,
                          3170422.6761999987
                        ]
                      ]
                    ],
                    "spatialReference": {
                      "wkid": 102100,
                      "latestWkid": 3857
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    {
      "id": "printOutlineLayer",
      "opacity": 1,
      "minScale": 0,
      "maxScale": 0,
      "featureCollection": {
        "layers": [
          {
            "layerDefinition": {
              "name": "polygonLayer",
              "geometryType": "esriGeometryPolygon"
            },
            "featureSet": {
              "geometryType": "esriGeometryPolygon",
              "features": [
                {
                  "geometry": {
                    "rings": [
                      [
                        [
                          -8964510.31413835,
                          3158627.702797455
                        ],
                        [
                          -8964510.31413835,
                          3158965.5257343827
                        ],
                        [
                          -8958290.25096165,
                          3158965.5257343827
                        ],
                        [
                          -8958290.25096165,
                          3158627.702797455
                        ],
                        [
                          -8964510.31413835,
                          3158627.702797455
                        ]
                      ]
                    ],
                    "spatialReference": {
                      "wkid": 102100
                    }
                  },
                  "symbol": {
                    "color": [
                      255,
                      0,
                      0,
                      204
                    ],
                    "type": "esriSFS",
                    "style": "esriSFSSolid"
                  }
                },
                {
                  "geometry": {
                    "rings": [
                      [
                        [
                          -8968726.374969315,
                          3159006.816093703
                        ],
                        [
                          -8954074.190130685,
                          3159006.816093703
                        ],
                        [
                          -8954074.190130685,
                          3173466.3800062975
                        ],
                        [
                          -8968726.374969315,
                          3173466.3800062975
                        ],
                        [
                          -8968726.374969315,
                          3159006.816093703
                        ]
                      ]
                    ],
                    "spatialReference": {
                      "wkid": 102100
                    }
                  },
                  "symbol": {
                    "color": [
                      255,
                      0,
                      0,
                      102
                    ],
                    "outline": {
                      "color": [
                        255,
                        0,
                        0,
                        255
                      ],
                      "width": 3.75,
                      "type": "esriSLS",
                      "style": "esriSLSSolid"
                    },
                    "type": "esriSFS",
                    "style": "esriSFSNull"
                  }
                }
              ]
            }
          },
          {
            "layerDefinition": {
              "name": "textLayer",
              "geometryType": "esriGeometryPoint"
            },
            "featureSet": {
              "geometryType": "esriGeometryPoint",
              "features": [
                {
                  "geometry": {
                    "x": -8961400.28255,
                    "y": 3158796.6142659187,
                    "spatialReference": {
                      "wkid": 102100
                    }
                  },
                  "symbol": {
                    "color": [
                      0,
                      0,
                      0,
                      255
                    ],
                    "type": "esriTS",
                    "verticalAlignment": "middle",
                    "horizontalAlignment": "center",
                    "angle": 0,
                    "xoffset": 0,
                    "yoffset": 0,
                    "text": "Pan or Zoom the map to adjust this print area.",
                    "rotated": false,
                    "kerning": true,
                    "font": {
                      "size": 12,
                      "style": "italic",
                      "decoration": "none",
                      "weight": "normal",
                      "family": "Arial"
                    }
                  }
                }
              ]
            }
          }
        ]
      }
    },
    {
      "id": "Canal Center Line",
      "title": "Canal Center Line",
      "opacity": 1,
      "minScale": 0,
      "maxScale": 0,
      "layerDefinition": {
        "drawingInfo": {
          "renderer": {
            "type": "simple",
            "symbol": {
              "color": [
                17,
                0,
                148,
                255
              ],
              "width": 0.75,
              "type": "esriSLS",
              "style": "esriSLSSolid"
            }
          }
        }
      },
      "url": "https://blahblahblah/MapServer/7"
    }
  ],
  "exportOptions": {
    "outputSize": [
      800,
      1100
    ],
    "dpi": 96
  },
  "layoutOptions": {
    "customTextElements": [
      {
        "county": "blah"
      },
      {
        "appNo": "blah"
      },
      {
        "str": "blah"
      },
      {
        "exhibitno": "blah"
      },
      {
        "permitno": "blah"
      },
      {
        "projname": "blah"
      }
    ],
    "scaleBarOptions": {},
    "legendOptions": {
      "operationalLayers": [
        {
          "id": "Facilities Layer"
        },
        {
          "id": "Selected Application"
        }
      ]
    }
  }
}
0 Kudos
0 Replies