<?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: Graphics layer symbol from DB.... in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/graphics-layer-symbol-from-db/m-p/489950#M11210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much for your reply.....I honestly dont know how it got fixed, i asked Jason Harris and he kindly fixed it...Regards &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 May 2011 21:26:34 GMT</pubDate>
    <dc:creator>raffia</dc:creator>
    <dc:date>2011-05-23T21:26:34Z</dc:date>
    <item>
      <title>Graphics layer symbol from DB....</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/graphics-layer-symbol-from-db/m-p/489948#M11208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear all developers, its been a week I have been trying to solve this minor issue, so any help is highly appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a point layer that loads into a graphics layer in the app representing commercial advertisers. Initially I embedded the symbol with a code that worked fine (pasted below), as I only had three entries, the embedding was fine, and I was checking the query result for name, and with If statements, I was assigning the graphics symbol. Here is the relevant parts of the code that worked. Am using the 2.3 flex API with Flex Builder 4&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The Embed code that worked fine:&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; 


[Embed(source='images/Commercial_Logos/ZAS.png')] 
private var picEmbeddedZAS:Class;
private var zasMarkerPicture:PictureMarkerSymbol = new PictureMarkerSymbol(picEmbeddedZAS);

&amp;nbsp; 

&amp;nbsp;&amp;nbsp; private function doQueryComm() : void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryCommercial.geometry = myMap.extent; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTaskCommercial.execute( queryCommercial, new AsyncResponder( onCommResult, onCommFault&amp;nbsp; ));
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }
 
&amp;nbsp;&amp;nbsp; private var commData:Object;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function commercialClickHandler (event:MouseEvent):void
&amp;nbsp;&amp;nbsp; {

&amp;nbsp;&amp;nbsp;&amp;nbsp; commData = event.target.parent.attributes;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; commIdentVariable = new commercialDetailsWindow();
&amp;nbsp;&amp;nbsp;&amp;nbsp; PopUpManager.addPopUp(commIdentVariable, this, false);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function onCommResult( featureSet : FeatureSet, token : Object = null ) : void
&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for each ( var myCommGraphic : Graphic in featureSet.features )
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
//here is where I check for the name, and assign the symbol
if (myCommGraphic.attributes.Name == 'ZAS - Z Aviation Services')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myCommGraphic.toolTip = 'ZAS - Z Aviation Services';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myCommGraphic.symbol = zasMarkerPicture;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; commGraphicsLayer.add(myCommGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }

&amp;nbsp; &amp;lt;esri:QueryTask id="queryTaskCommercial" url="http://arcgis2.roktech.net/ArcGIS/rest/services/DigitalEg/English/MapServer/3"/&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;esri:Query id="queryCommercial" outFields='["Name" , "Type" ,&amp;nbsp; "LargeLogo" , "SmallLogo"]'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnGeometry="true" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 


&amp;lt;esri:Map id="myMap" extentChange="doQueryComm();"&amp;gt;

 &amp;lt;esri:GraphicsLayer id="myCommGraphicsLayer" symbol="{mySFS}"/&amp;gt;&amp;nbsp; 
 &amp;lt;esri:GraphicsLayer id="commGraphicsLayer" click="commercialClickHandler(event);" &amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 &amp;lt;/esri:GraphicsLayer&amp;gt;

 
&amp;lt;/esri:Map&amp;gt;

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am attempting to load the path to the symbol source from a field called SmallLogo, I tried assigning the source using a variety of methods, and it failed in all. I tried to assign the source to myCommGraphic.attributes.SmallLogo and then to commData.SmallLogoLogo, both didn't work. Below is my last attempt to do so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
 private var commData:Object;
 private var commercialMarkerPicture:PictureMarkerSymbol ;
 private function doQueryComm() : void
 {
 queryCommercial.geometry = myMap.extent; 
 queryTaskCommercial.execute( queryCommercial, new AsyncResponder( onCommResult, onCommFault&amp;nbsp; ));
 
 }
 private var commData:Object;
 private var commercialMarkerPicture:PictureMarkerSymbol 
 
 
 private function onCommResult( featureSet : FeatureSet, token : Object = null ) : void
 {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 for each ( var myCommGraphic : Graphic in featureSet.features )
 {
 
 myCommGraphic.toolTip = commData.Name;
 commercialMarkerPicture = new PictureMarkerSymbol( myCommGraphic.attributes.SmallLogo)&amp;nbsp; ; 
 myCommGraphic.symbol = commercialMarkerPicture;
 commGraphicsLayer.add(myCommGraphic); 
 
 
 }
 } 
 
 
 private function commercialClickHandler (event:MouseEvent):void
 {

 commData = event.target.parent.attributes;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 commIdentVariable = new commercialDetailsWindow();
 PopUpManager.addPopUp(commIdentVariable, this, false);
 commIdentVariable.addEventListener("OK",commercialCloseHandler)
 commIdentVariable.commercialNameTextID.text = commData.Name;
&amp;nbsp; //bla bla bla
 
 }
 //Code for Query task and Map are identical to above

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried this -- myCommGraphic.symbol = myCommGraphic.attributes.SmallLogo;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That didn't work to.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2011 23:00:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/graphics-layer-symbol-from-db/m-p/489948#M11208</guid>
      <dc:creator>raffia</dc:creator>
      <dc:date>2011-05-13T23:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics layer symbol from DB....</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/graphics-layer-symbol-from-db/m-p/489949#M11209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private var zasMarkerPicture:PictureMarkerSymbol = new PictureMarkerSymbol('data.SmallLogo');&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2011 02:13:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/graphics-layer-symbol-from-db/m-p/489949#M11209</guid>
      <dc:creator>RobertMyers</dc:creator>
      <dc:date>2011-05-20T02:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics layer symbol from DB....</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/graphics-layer-symbol-from-db/m-p/489950#M11210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much for your reply.....I honestly dont know how it got fixed, i asked Jason Harris and he kindly fixed it...Regards &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 21:26:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/graphics-layer-symbol-from-db/m-p/489950#M11210</guid>
      <dc:creator>raffia</dc:creator>
      <dc:date>2011-05-23T21:26:34Z</dc:date>
    </item>
  </channel>
</rss>

