<?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 Custom Query Widget in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109176#M3907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm would like to customize the Query Widget 3.1 to display the return results with three different icons instead of a single icon (fire.png police.png ems.png) according to the values on the queried field. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;query&amp;gt; Agency_Type = 'F' OR Agency_Type = 'P' OR Agency_Type = 'M'&amp;lt;/query&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help, suggestions, directions would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]21409[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2013 18:51:36 GMT</pubDate>
    <dc:creator>DanielMunoz</dc:creator>
    <dc:date>2013-02-04T18:51:36Z</dc:date>
    <item>
      <title>Custom Query Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109176#M3907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm would like to customize the Query Widget 3.1 to display the return results with three different icons instead of a single icon (fire.png police.png ems.png) according to the values on the queried field. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;query&amp;gt; Agency_Type = 'F' OR Agency_Type = 'P' OR Agency_Type = 'M'&amp;lt;/query&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help, suggestions, directions would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]21409[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2013 18:51:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109176#M3907</guid>
      <dc:creator>DanielMunoz</dc:creator>
      <dc:date>2013-02-04T18:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Query Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109177#M3908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will need to modify the createQueryResults function. In the for each (var graphic:Graphic in featureSet.features) statement do something similar to what you did in the live layer widget on your post here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/23561-QueryWidget?highlight=result+symbol"&gt;http://forums.arcgis.com/threads/23561-QueryWidget?highlight=result+symbol&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then remove the symbology being added under the switch (featureSet.geometryType).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anthony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 07:16:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109177#M3908</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2013-02-05T07:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Query Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109178#M3909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anthony,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your reply, as you saw I have been using this mod to QueryWidget since it used to be the LiveLayer until version 3.0 of the viewer. Unfortunately the code on version 3.1 changed a lot and I'm totally lost (not a programmer) but reading your post gave the idea of bringing the QueryWidget 3.0 into 3.1 and worked, not the best and probably would come back to hunt me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a great mod to differentiate the query results with different icons, I would like to believe someone else out there is doing the same mod and would post the update sometime so i can keep up with the viewer for flex updates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 13:57:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109178#M3909</guid>
      <dc:creator>DanielMunoz</dc:creator>
      <dc:date>2013-02-05T13:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Query Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109179#M3910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got a customized query widget to work with 3.4 with the following enhancements --&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Declare any new marker symbols you'll need...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private var resultMarkerSymbol:Symbol;
private var resultMarkerSymbol1:Symbol;
private var resultMarkerSymbol2:Symbol;&amp;nbsp;&amp;nbsp; 
private var resultMarkerSymbol3:Symbol;&amp;nbsp;&amp;nbsp; 
private var resultMarkerSymbol4:Symbol;&amp;nbsp;&amp;nbsp; 
private var resultMarkerSymbol5:Symbol;&lt;/PRE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-- After marker symbol is defined...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//marker symbol
const resultMarkerSymbolURL:String = configXML.symbols.picturemarkersymbol.@url || widgetIcon;
const parsedResultMarkerSymbolHeight:Number = parseFloat(configXML.symbols.picturemarkersymbol.@height[0]);
const resultMarkerSymbolHeight:Number = isNaN(parsedResultMarkerSymbolHeight) ? 0 : parsedResultMarkerSymbolHeight;
const parsedResultMarkerSymbolWidth:Number = parseFloat(configXML.symbols.picturemarkersymbol.@width[0]);
const resultMarkerSymbolWidth:Number = isNaN(parsedResultMarkerSymbolWidth) ? 0 : parsedResultMarkerSymbolWidth;
const resultMarkerSymbolXOffset:Number = (configXML.symbols.picturemarkersymbol.@xoffset != null) ? configXML.symbols.picturemarkersymbol.@xoffset : 0;
const resultMarkerSymbolYOffset:Number = (configXML.symbols.picturemarkersymbol.@yoffset != null) ? configXML.symbols.picturemarkersymbol.@yoffset : 0;
resultMarkerSymbol = new PictureMarkerSymbol(resultMarkerSymbolURL, resultMarkerSymbolWidth, resultMarkerSymbolHeight, resultMarkerSymbolXOffset, resultMarkerSymbolYOffset);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Add any custom marker symbols you may need...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//special markers for classified values -- one for each value to be symbolized
resultMarkerSymbol1 = new PictureMarkerSymbol("assets/images/i_hydro_green.png", resultMarkerSymbolWidth, resultMarkerSymbolHeight, resultMarkerSymbolXOffset, resultMarkerSymbolYOffset);
resultMarkerSymbol2 = new PictureMarkerSymbol("assets/images/i_hydro_yellow.png", resultMarkerSymbolWidth, resultMarkerSymbolHeight, resultMarkerSymbolXOffset, resultMarkerSymbolYOffset);&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- In createQueryResults, after setting the infoWindowRenderer, add code setting a graphic symbol for each desired value. I am classifying by "Stage" and only showing a few of the values by which to classify...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var infoWindowRenderer:ClassFactory = new ClassFactory(PopUpRenderer);
infoWindowRenderer.properties = { popUpInfo: configurePopUpInfo(resultAttributes)};
graphic.infoWindowRenderer = infoWindowRenderer;

var fieldNameTextValue:String = graphic.attributes["Stage"];
if (fieldNameTextValue == "normal")
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol = resultMarkerSymbol1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
}
else if (fieldNameTextValue == "action")
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol = resultMarkerSymbol2&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; 
}
else
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //leave a default marker if needed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.symbol = resultMarkerSymbol
}&lt;/PRE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- In the case statement below that, comment out setting a renderer for the whole layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;case Geometry.MAPPOINT:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
 //resultFeatureLayer.renderer = new SimpleRenderer(resultMarkerSymbol);
 break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That worked for me with a point layer -- more would have to be done with lines and/or polygons.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:34:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/custom-query-widget/m-p/109179#M3910</guid>
      <dc:creator>RichardButgereit</dc:creator>
      <dc:date>2021-12-11T06:34:00Z</dc:date>
    </item>
  </channel>
</rss>

