<?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: Flex viewer set line colour for selected feature in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316702#M9255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Without seeing your code, all I can do is guess based on your minimal code shared. One thing that sticks out is&lt;/P&gt;&lt;P&gt;graphicsLayer.symbol = sfs;&lt;/P&gt;&lt;P&gt;Normally people use sfs for a &lt;STRONG&gt;S&lt;/STRONG&gt;imple &lt;STRONG&gt;F&lt;/STRONG&gt;ill &lt;STRONG&gt;S&lt;/STRONG&gt;ymbol and not a SImpleLineSymbol. Also the graphicsLayer symbol will be ignored if the actual graphic gets a symbol assigned in the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2015 03:57:10 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2015-01-08T03:57:10Z</dc:date>
    <item>
      <title>Flex viewer set line colour for selected feature</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316701#M9254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use querytask to select polyline feature, but the selected feature colour just the same of all other features in the same layer. I tried to set the colour use:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;esri:SimpleLineSymbol id="lineSymbol"
&amp;nbsp; alpha="0.4"
&amp;nbsp; color="0x0000FF"
&amp;nbsp; width="2"&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is no effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add code in querytask onResult function using &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;graphicsLayer.symbol = sfs;&lt;/PRE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also no effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an example for set colour for polyline selected feature(s), the sample I found both for polygon features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:03:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316701#M9254</guid>
      <dc:creator>KoseWong</dc:creator>
      <dc:date>2021-12-11T15:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Flex viewer set line colour for selected feature</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316702#M9255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Without seeing your code, all I can do is guess based on your minimal code shared. One thing that sticks out is&lt;/P&gt;&lt;P&gt;graphicsLayer.symbol = sfs;&lt;/P&gt;&lt;P&gt;Normally people use sfs for a &lt;STRONG&gt;S&lt;/STRONG&gt;imple &lt;STRONG&gt;F&lt;/STRONG&gt;ill &lt;STRONG&gt;S&lt;/STRONG&gt;ymbol and not a SImpleLineSymbol. Also the graphicsLayer symbol will be ignored if the actual graphic gets a symbol assigned in the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 03:57:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316702#M9255</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-01-08T03:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Flex viewer set line colour for selected feature</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316703#M9256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your explanation, sorry to provide piece of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The related code as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;queryTask.execute(query, new AsyncResponder(onQueryResult, onQueryFault)); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function onQueryResult(resultSet:FeatureSet, token:Object = null):void&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; {&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLayer.clear();&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (resultSet.features.length == 0)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show("No feature returned, please try again.");&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var finalExtent:Extent;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var stGraphic:Graphic = resultSet.features[0];&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finalExtent = Polyline(stGraphic.geometry).extent;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stGraphic = new Graphic();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each (var graphic:Graphic in resultSet.features)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; &lt;/P&gt;&lt;P&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; stGraphic.geometry = graphic.geometry;&lt;/P&gt;&lt;P&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; //resultLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0x0000FF, 0.4, 2); // this line no use, right?&lt;/P&gt;&lt;P&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; graphicsLayer.add(graphic);&amp;nbsp; &lt;/P&gt;&lt;P&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; finalExtent = finalExtent.union(Polyline(graphic.geometry).extent);&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&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; graphicsLayer.symbol = sfs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.extent = finalExtent;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function onQueryFault(faultInfo:Object, token:Object = null):void&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; {&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(faultInfo.toString());&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; } &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no other code to set the symbol. Is there something wrong with my code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 01:22:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316703#M9256</guid>
      <dc:creator>KoseWong</dc:creator>
      <dc:date>2015-01-09T01:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Flex viewer set line colour for selected feature</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316704#M9257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kose,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here is the code fixed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;queryTask.execute(query, new AsyncResponder(onQueryResult, onQueryFault)); 

function onQueryResult(resultSet:FeatureSet, token:Object = null):void&amp;nbsp; 
&amp;nbsp; {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLayer.clear();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (resultSet.features.length == 0){&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show("No feature returned, please try again.");&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var finalExtent:Extent;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var stGraphic:Graphic = resultSet.features[0];&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finalExtent = Polyline(stGraphic.geometry).extent;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resultLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0x0000FF, 0.4, 2);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLayer.symbol = resultLineSymbol;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each (var graphic:Graphic in resultSet.features){
&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; stGraphic = new Graphic(graphic.geometry);
&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; graphicsLayer.add(graphic);&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; finalExtent = finalExtent.union(Polyline(graphic.geometry).extent);
&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.extent = finalExtent;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }

function onQueryFault(faultInfo:Object, token:Object = null):void&amp;nbsp; 
&amp;nbsp; {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(faultInfo.toString());&amp;nbsp; 
&amp;nbsp; } &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316704#M9257</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T15:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Flex viewer set line colour for selected feature</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316705#M9258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works! Thank you very very much!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 02:26:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/flex-viewer-set-line-colour-for-selected-feature/m-p/316705#M9258</guid>
      <dc:creator>KoseWong</dc:creator>
      <dc:date>2015-01-09T02:26:39Z</dc:date>
    </item>
  </channel>
</rss>

