<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic WebMap.print() not working with custom print templates. in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-print-not-working-with-custom-print/m-p/1432952#M10005</link>
    <description>&lt;P&gt;We're using RHEL7 and ArcGIS Enterprise 10.9.1&lt;/P&gt;&lt;P&gt;Whenever I invoke the WebMap.print() method, while using a custom print template, the legend is not added to the layout and locked down layers are not rendered on the map. I resorted to editing the arcgis.mapping._types module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Here are the edits I made

        # Commenting this out because layoutOptions doesn't belong in the map_options dict.
        # if layout_options:
        #     map_options["layoutOptions"] = layout_options


        # compose export options
        export_options = {"dpi": dpi, "outputSize": output_dimensions}

        # This allows for printing locked down layers
        for layer in self._webmapdict["operationalLayers"]:
            layer["token"] = self._con.token

        print_options = {
            "mapOptions": map_options,
            "operationalLayers": self._webmapdict["operationalLayers"],
            "baseMap": self._basemap,
            "exportOptions": export_options,
        }

        # layout_options belongs in the print_options dict.
        if layout_options:
            print_options["layoutOptions"] = layout_options&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Figure I should bring this to the community's attention.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 17:22:09 GMT</pubDate>
    <dc:creator>TeslaGovernment</dc:creator>
    <dc:date>2024-05-10T17:22:09Z</dc:date>
    <item>
      <title>WebMap.print() not working with custom print templates.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-print-not-working-with-custom-print/m-p/1432952#M10005</link>
      <description>&lt;P&gt;We're using RHEL7 and ArcGIS Enterprise 10.9.1&lt;/P&gt;&lt;P&gt;Whenever I invoke the WebMap.print() method, while using a custom print template, the legend is not added to the layout and locked down layers are not rendered on the map. I resorted to editing the arcgis.mapping._types module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Here are the edits I made

        # Commenting this out because layoutOptions doesn't belong in the map_options dict.
        # if layout_options:
        #     map_options["layoutOptions"] = layout_options


        # compose export options
        export_options = {"dpi": dpi, "outputSize": output_dimensions}

        # This allows for printing locked down layers
        for layer in self._webmapdict["operationalLayers"]:
            layer["token"] = self._con.token

        print_options = {
            "mapOptions": map_options,
            "operationalLayers": self._webmapdict["operationalLayers"],
            "baseMap": self._basemap,
            "exportOptions": export_options,
        }

        # layout_options belongs in the print_options dict.
        if layout_options:
            print_options["layoutOptions"] = layout_options&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Figure I should bring this to the community's attention.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 17:22:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/webmap-print-not-working-with-custom-print/m-p/1432952#M10005</guid>
      <dc:creator>TeslaGovernment</dc:creator>
      <dc:date>2024-05-10T17:22:09Z</dc:date>
    </item>
  </channel>
</rss>

