<?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 DrawWidget spatialReference for lastDrawnGraphic in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/drawwidget-spatialreference-for-lastdrawngraphic/m-p/573578#M16444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At the end of drawing in drawWidget in the function activateDrawTool(event : MouseEvent) I have a code&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;setMapAction(drawType, drawStatus, null, map_drawEndHandler);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then works function map_drawEndHandler(event : DrawEvent)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var geom:Geometry = event.graphic.geometry;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDrawnGraphic = new Graphic(geom); graphicsLayer.add(lastDrawnGraphic);&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I have several layers in my project with different spatialReference. And I'd like to add graphic element with spatialReference of the layer, not the map. But event in function map_drawEndHandler(event:DrawEvent) already had spatialReference and coordinatesSystem of basemaps_layer in my config.xml. And lastDrawnGraphic will have coordinates according to basemaps_layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance. And sorry for my bad english.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2012 06:04:56 GMT</pubDate>
    <dc:creator>AndrewIosida</dc:creator>
    <dc:date>2012-08-29T06:04:56Z</dc:date>
    <item>
      <title>DrawWidget spatialReference for lastDrawnGraphic</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/drawwidget-spatialreference-for-lastdrawngraphic/m-p/573578#M16444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At the end of drawing in drawWidget in the function activateDrawTool(event : MouseEvent) I have a code&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;setMapAction(drawType, drawStatus, null, map_drawEndHandler);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then works function map_drawEndHandler(event : DrawEvent)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var geom:Geometry = event.graphic.geometry;&amp;nbsp;&amp;nbsp;&amp;nbsp; lastDrawnGraphic = new Graphic(geom); graphicsLayer.add(lastDrawnGraphic);&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I have several layers in my project with different spatialReference. And I'd like to add graphic element with spatialReference of the layer, not the map. But event in function map_drawEndHandler(event:DrawEvent) already had spatialReference and coordinatesSystem of basemaps_layer in my config.xml. And lastDrawnGraphic will have coordinates according to basemaps_layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance. And sorry for my bad english.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 06:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/drawwidget-spatialreference-for-lastdrawngraphic/m-p/573578#M16444</guid>
      <dc:creator>AndrewIosida</dc:creator>
      <dc:date>2012-08-29T06:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: DrawWidget spatialReference for lastDrawnGraphic</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/drawwidget-spatialreference-for-lastdrawngraphic/m-p/573579#M16445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Andrew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; The issue is that this line calls a function in the MapManager.mxml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;setMapAction(drawType, drawStatus, null, map_drawEndHandler);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Which uses the DrawTool which will always draw in the same spatial reference as the map. So no matter what you will have to reproject the returned graphic to your desired spatial reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also you need to post Flex Viewer /Widget questions to the Flex Viewer forum:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the Flex API forum.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 11:23:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/drawwidget-spatialreference-for-lastdrawngraphic/m-p/573579#M16445</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-08-29T11:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: DrawWidget spatialReference for lastDrawnGraphic</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/drawwidget-spatialreference-for-lastdrawngraphic/m-p/573580#M16446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, Robert.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 05:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/drawwidget-spatialreference-for-lastdrawngraphic/m-p/573580#M16446</guid>
      <dc:creator>AndrewIosida</dc:creator>
      <dc:date>2012-08-30T05:07:38Z</dc:date>
    </item>
  </channel>
</rss>

