<?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: layerDrawingOptions and custom Symbol in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdrawingoptions-and-custom-symbol/m-p/490132#M11242</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Custom symbols are not supported unless they implement IJSONSupport and the JSON is supported by the REST API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/rest/apiref/symbol.html" rel="nofollow" target="_blank"&gt;http://resources.arcgis.com/en/help/rest/apiref/symbol.html&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/utils/IJSONSupport.html" rel="nofollow" target="_blank"&gt;http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/utils/IJSONSupport.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2012 17:56:03 GMT</pubDate>
    <dc:creator>DasaPaddock</dc:creator>
    <dc:date>2012-10-31T17:56:03Z</dc:date>
    <item>
      <title>layerDrawingOptions and custom Symbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdrawingoptions-and-custom-symbol/m-p/490131#M11241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;can the renderers in layerDrawingOptions make use of custom symbols? i have the following custom symbol (simplified for the time being)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;package symbols {&amp;nbsp;&amp;nbsp;&amp;nbsp; import com.esri.ags.Map;&amp;nbsp; import com.esri.ags.geometry.Geometry;&amp;nbsp; import com.esri.ags.geometry.MapPoint;&amp;nbsp; import com.esri.ags.symbols.MarkerSymbol;&amp;nbsp; import com.esri.ags.symbols.Symbol;&amp;nbsp;&amp;nbsp;&amp;nbsp; import flash.display.Sprite;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class MooringSymbol extends MarkerSymbol { &amp;nbsp;&amp;nbsp; &amp;nbsp; public function MooringSymbol() { &amp;nbsp;&amp;nbsp; super(); &amp;nbsp; } &amp;nbsp;&amp;nbsp; &amp;nbsp; override public function clear(sprite:Sprite):void { &amp;nbsp;&amp;nbsp; sprite.graphics.clear(); &amp;nbsp; } &amp;nbsp;&amp;nbsp; &amp;nbsp; override public function draw(sprite:Sprite,geometry:Geometry,attributes:Object,map:Map):void { &amp;nbsp;&amp;nbsp; if (geometry is MapPoint) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var radius:int=15;// POC testing, production based on attributes &amp;nbsp;&amp;nbsp;&amp;nbsp; sprite.x=toScreenX(map,(geometry as MapPoint).x); &amp;nbsp;&amp;nbsp;&amp;nbsp; sprite.y=toScreenY(map,(geometry as MapPoint).y); &amp;nbsp;&amp;nbsp;&amp;nbsp; sprite.graphics.beginFill(0xFF0000,0.5); &amp;nbsp;&amp;nbsp;&amp;nbsp; sprite.graphics.drawCircle(0,0,radius); &amp;nbsp;&amp;nbsp;&amp;nbsp; sprite.graphics.endFill(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;applied to the&amp;nbsp; layerDrawingOptions for a given layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;protected function infrastructureLayer_initializeHandler(event:FlexEvent):void {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; drawingOptions=infrastructureLayer.layerDrawingOptions; &amp;nbsp;&amp;nbsp;&amp;nbsp; var r:SimpleRenderer=new SimpleRenderer();&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var dO:LayerDrawingOptions=new LayerDrawingOptions();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; r.symbol=new MooringSymbol(); &amp;nbsp;&amp;nbsp;&amp;nbsp; dO.renderer=r; &amp;nbsp;&amp;nbsp;&amp;nbsp; dO.alpha=1; &amp;nbsp;&amp;nbsp;&amp;nbsp; dO.layerId=0; &amp;nbsp;&amp;nbsp;&amp;nbsp; dO.showLabels=true; &amp;nbsp;&amp;nbsp;&amp;nbsp; dO.scaleSymbols=false; &amp;nbsp;&amp;nbsp;&amp;nbsp; drawingOptions[0]=dO; &amp;nbsp;&amp;nbsp;&amp;nbsp; infrastructureLayer.layerDrawingOptions=drawingOptions; &amp;nbsp;&amp;nbsp;&amp;nbsp; infrastructureLayer.refresh();&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but it appears the symbol is never applied as that layer shows up empty. if i switch to a standard Symbol (MarkerSybol, etc.), works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is approach this possible? any suggestions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 16:57:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdrawingoptions-and-custom-symbol/m-p/490131#M11241</guid>
      <dc:creator>PaulHastings1</dc:creator>
      <dc:date>2012-10-31T16:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: layerDrawingOptions and custom Symbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdrawingoptions-and-custom-symbol/m-p/490132#M11242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Custom symbols are not supported unless they implement IJSONSupport and the JSON is supported by the REST API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/rest/apiref/symbol.html" rel="nofollow" target="_blank"&gt;http://resources.arcgis.com/en/help/rest/apiref/symbol.html&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/utils/IJSONSupport.html" rel="nofollow" target="_blank"&gt;http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/utils/IJSONSupport.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 17:56:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdrawingoptions-and-custom-symbol/m-p/490132#M11242</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2012-10-31T17:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: layerDrawingOptions and custom Symbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdrawingoptions-and-custom-symbol/m-p/490133#M11243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for the reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can i interpret that as i shouldn't be extending Symbol but constructing the symbol as JSON to send back to the server? any chance of some examples of that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i think my real problem is server-side vs client-side symbolization.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 02:25:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/layerdrawingoptions-and-custom-symbol/m-p/490133#M11243</guid>
      <dc:creator>PaulHastings1</dc:creator>
      <dc:date>2012-11-01T02:25:52Z</dc:date>
    </item>
  </channel>
</rss>

