<?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 Re: Export using Printing tools into another projection? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219629#M5157</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am describing a work around without using flashbuilder. Instead use the Advanced High Quality mapping tutorial to setup your *.mxd templates and your datastore. You then expose the layout template name as your spatial reference using python (understandable by Arcmap) and the user can use the standard print widget in Viewer for flex to print in the desired spatial reference. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//0057000000mq000000" rel="nofollow"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//0057000000mq000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;templatePath = 'C://folder2//'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Input WebMap json&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Web_Map_as_JSON = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Format for output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Format = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if Format == '#' or not Format:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Format = "PDF" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Input Layout template&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Layout_Template = arcpy.GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if Layout_Template == '#' or not Layout_Template:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Layout_Template = "WGS 1984 UTM ZONE 17N" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Get the requested map document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;templateMxd = os.path.join(templatePath, Layout_Template + '.mxd')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Convert the WebMap to a map document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, templateMxd)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = result.mapDocument&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;#DAA520&amp;quot;;"&gt;sr = arcpy.SpatialReference(Layout_Template) #Set spatial reference based on the name&lt;BR /&gt;df = arcpy.mapping.ListDataFrames(mxd)[0] #setting it for the data frame&lt;BR /&gt;df.spatialReference = arcpy.SpatialReference(Layout_Template) #finish him&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Use the uuid module to generate a GUID as part of the output name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# This will ensure a unique output name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output = 'WebMap_{}.{}'.format(str(uuid.uuid1()), Format)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output_File = os.path.join(arcpy.env.scratchFolder, output)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Export the WebMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if Format.lower() == 'pdf':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.mapping.ExportToPDF(mxd, Output_File) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;elif Format.lower() == 'png':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.mapping.ExportToPNG(mxd, Output_File)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the output parameter to be the output file of the server job&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameterAsText(3, Output_File)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Clean up - delete the map document reference&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;filePath = mxd.filePath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd, result&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;os.remove(filePath)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]33286[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2014 17:49:50 GMT</pubDate>
    <dc:creator>PatrickRhodes1</dc:creator>
    <dc:date>2014-04-23T17:49:50Z</dc:date>
    <item>
      <title>Export using Printing tools into another projection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219626#M5154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am quite new to the Flex WebApi world. I am using the Flex WebApi and have set up map templates to print maps out to my own template as a PDF. In my template I have the Map grid set. When I eport the WebMap it is displayed in Web Mercator Auxilliary Sphere as it is the set coordinate system in the WebApi (using BingMaps). Does anybody know a way to export this WebMap in a different coordinate system , so that my mapgrid on my map is displayed in the right projection??? Please ask if you have any more questions as I am really struggling with it. People in my company are using GDA94 and when they print a map they also want to have these coordinates displayed on their PDF map and not the Web Mercator coordinates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bart&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 01:39:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219626#M5154</guid>
      <dc:creator>BartBajek</dc:creator>
      <dc:date>2013-03-12T01:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Export using Printing tools into another projection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219627#M5155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try setting the PrintParameters.outSpatialReference property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/tasks/supportClasses/PrintParameters.html#outSpatialReference"&gt;http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/tasks/supportClasses/PrintParameters.html#outSpatialReference&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 21:35:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219627#M5155</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2013-03-22T21:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Export using Printing tools into another projection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219628#M5156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can the Tiled ESRI Basemaps be used with exportwebmap to generate a print in a&amp;nbsp; different projection through FLEX (or a different API)?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also have custom map templates for printing.&amp;nbsp; In these templates there is a 1000m grid that should align with the USNG in Ohio as the templates were developed using UTM Zone 17 N.&amp;nbsp; When printing at a fixed scale the USNG misaligns with the 1000m grid by about a scale of 1.3 for Northern Ohio.&amp;nbsp; So when I print, the USNG measures at 1300m instead of 1000m at that latitude.&amp;nbsp; This is a result of the basemap being in Web Mercatur.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My understanding is that since I use the tiled ESRI basemaps that are in Web Mercatur projection, I can't on the fly project the output to UTM Zone 17N.&amp;nbsp; Furthermore, since the Web Mercatur does not preserve distance, printing a fixed scale map is not possible.&amp;nbsp; A 1:50000 scale map is closer to a 1:60000 scale map.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see the option of setting the outputspatial reference for the export print task (&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/flex/api-reference/com/esri/ags/tasks/supportClasses/PrintParameters.html"&gt;https://developers.arcgis.com/flex/api-reference/com/esri/ags/tasks/supportClasses/PrintParameters.html&lt;/A&gt;&lt;SPAN&gt;), but in my scouring of the forums, it is often mentioned that you can't reproject the tiled services. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not a flex developer, but have enough experience to fumble my way through modifying existing code.&amp;nbsp; Can the Tiled ESRI Basemaps be used to print in a different projection through FLEX (or a different API)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 11:31:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219628#M5156</guid>
      <dc:creator>JoeTack</dc:creator>
      <dc:date>2014-04-09T11:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Export using Printing tools into another projection?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219629#M5157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am describing a work around without using flashbuilder. Instead use the Advanced High Quality mapping tutorial to setup your *.mxd templates and your datastore. You then expose the layout template name as your spatial reference using python (understandable by Arcmap) and the user can use the standard print widget in Viewer for flex to print in the desired spatial reference. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//0057000000mq000000" rel="nofollow"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//0057000000mq000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;templatePath = 'C://folder2//'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Input WebMap json&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Web_Map_as_JSON = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Format for output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Format = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if Format == '#' or not Format:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Format = "PDF" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Input Layout template&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Layout_Template = arcpy.GetParameterAsText(2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if Layout_Template == '#' or not Layout_Template:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Layout_Template = "WGS 1984 UTM ZONE 17N" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Get the requested map document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;templateMxd = os.path.join(templatePath, Layout_Template + '.mxd')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Convert the WebMap to a map document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, templateMxd)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = result.mapDocument&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;#DAA520&amp;quot;;"&gt;sr = arcpy.SpatialReference(Layout_Template) #Set spatial reference based on the name&lt;BR /&gt;df = arcpy.mapping.ListDataFrames(mxd)[0] #setting it for the data frame&lt;BR /&gt;df.spatialReference = arcpy.SpatialReference(Layout_Template) #finish him&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Use the uuid module to generate a GUID as part of the output name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# This will ensure a unique output name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;output = 'WebMap_{}.{}'.format(str(uuid.uuid1()), Format)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Output_File = os.path.join(arcpy.env.scratchFolder, output)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Export the WebMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if Format.lower() == 'pdf':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.mapping.ExportToPDF(mxd, Output_File) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;elif Format.lower() == 'png':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.mapping.ExportToPNG(mxd, Output_File)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the output parameter to be the output file of the server job&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameterAsText(3, Output_File)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Clean up - delete the map document reference&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;filePath = mxd.filePath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd, result&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;os.remove(filePath)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]33286[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 17:49:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/export-using-printing-tools-into-another/m-p/219629#M5157</guid>
      <dc:creator>PatrickRhodes1</dc:creator>
      <dc:date>2014-04-23T17:49:50Z</dc:date>
    </item>
  </channel>
</rss>

