<?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 what is the best practice for using ClassBreaksRender in buffer searching? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-best-practice-for-using/m-p/17347#M1618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Referring to this &lt;A href="https://developers.arcgis.com/javascript/jssamples/query_buffer.html"&gt;topic&lt;/A&gt;, I can search the result within a drawn polygon, however it requires me to set a template for returned result:&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;var symbol = new SimpleMarkerSymbol(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; SimpleMarkerSymbol.STYLE_CIRCLE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; 12,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; new SimpleLineSymbol(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; SimpleLineSymbol.STYLE_NULL,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; new Color([247, 34, 101, 0.9]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; new Color([207, 34, 171, 0.5])&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;featureLayer.setSelectionSymbol(symbol);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine, but I want to make every returned records have its own color which is determined by its attributes value, i.e. blue color represents cars, yellow represents building, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;featureLayer.queryFeatures(query, function (featureSet) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var inBuffer = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var renderer = new ClassBreaksRenderer(null, "category_id");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; renderer.setMaxInclusive(true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var categoryColorList = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var inBuffer = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; for (var i = 0; i &amp;lt; featureSet.features.length; i++) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; if (featureSet.features&lt;I&gt;.geometry == null)&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; continue;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; inBuffer.push(featureSet.features&lt;I&gt;.attributes[featureLayer.objectIdField]);&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var rcolor = new Color([Math.floor((Math.random() * 255) + 1), Math.floor((Math.random() * 255) + 1), Math.floor((Math.random() * 255) + 1)]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; if (typeof eval("categoryColorList._" + featureSet.features&lt;I&gt;.attributes.category_id)&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; == "undefined") {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; eval("categoryColorList._" + featureSet.features&lt;I&gt;.attributes.category_id + " = rcolor");&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var symbol = new SimpleMarkerSymbol({&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "color": eval("categoryColorList._" + featureSet.features&lt;I&gt;.attributes.category_id),&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "size": 5,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "angle": 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "xoffset": 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "yoffset": 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "type": "esriSMS",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "style": "esriSMSSquare",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "outline": { "color": eval("categoryColorList._" + featureSet.features&lt;I&gt;.attributes.category_id), "width": 1, "type": "esriSLS", "style": "esriSLSSolid" }&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; renderer.addBreak({&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; field: "category_id",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; minValue: featureSet.features&lt;I&gt;.attributes.category_id,&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; maxValue: featureSet.features&lt;I&gt;.attributes.category_id,&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; symbol: symbol&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; query = new Query();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; query.objectIds = inBuffer;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; (function (featureLayer) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function (results) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; featureLayer.refresh();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; })(featureLayer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although within the polygon, the results are returned, the related records outside the polygon are also being shown. I was wondering if someone could let me know if there are something else that I should care about. I am not going to use graphic layer to store the returned result because I want to keep things simple, with only 1 feature layer, thanks you.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="related_color_also_selected.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/39723_related_color_also_selected.png" style="width: 620px; height: 404px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Dec 2014 10:11:01 GMT</pubDate>
    <dc:creator>StephenLam</dc:creator>
    <dc:date>2014-12-12T10:11:01Z</dc:date>
    <item>
      <title>what is the best practice for using ClassBreaksRender in buffer searching?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-best-practice-for-using/m-p/17347#M1618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Referring to this &lt;A href="https://developers.arcgis.com/javascript/jssamples/query_buffer.html"&gt;topic&lt;/A&gt;, I can search the result within a drawn polygon, however it requires me to set a template for returned result:&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;var symbol = new SimpleMarkerSymbol(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; SimpleMarkerSymbol.STYLE_CIRCLE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; 12,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; new SimpleLineSymbol(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; SimpleLineSymbol.STYLE_NULL,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; new Color([247, 34, 101, 0.9]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; new Color([207, 34, 171, 0.5])&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;featureLayer.setSelectionSymbol(symbol);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine, but I want to make every returned records have its own color which is determined by its attributes value, i.e. blue color represents cars, yellow represents building, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;featureLayer.queryFeatures(query, function (featureSet) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var inBuffer = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var renderer = new ClassBreaksRenderer(null, "category_id");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; renderer.setMaxInclusive(true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var categoryColorList = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var inBuffer = [];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; for (var i = 0; i &amp;lt; featureSet.features.length; i++) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; if (featureSet.features&lt;I&gt;.geometry == null)&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; continue;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; inBuffer.push(featureSet.features&lt;I&gt;.attributes[featureLayer.objectIdField]);&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var rcolor = new Color([Math.floor((Math.random() * 255) + 1), Math.floor((Math.random() * 255) + 1), Math.floor((Math.random() * 255) + 1)]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; if (typeof eval("categoryColorList._" + featureSet.features&lt;I&gt;.attributes.category_id)&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; == "undefined") {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; eval("categoryColorList._" + featureSet.features&lt;I&gt;.attributes.category_id + " = rcolor");&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; var symbol = new SimpleMarkerSymbol({&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "color": eval("categoryColorList._" + featureSet.features&lt;I&gt;.attributes.category_id),&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "size": 5,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "angle": 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "xoffset": 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "yoffset": 0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "type": "esriSMS",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "style": "esriSMSSquare",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; "outline": { "color": eval("categoryColorList._" + featureSet.features&lt;I&gt;.attributes.category_id), "width": 1, "type": "esriSLS", "style": "esriSLSSolid" }&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; renderer.addBreak({&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; field: "category_id",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; minValue: featureSet.features&lt;I&gt;.attributes.category_id,&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; maxValue: featureSet.features&lt;I&gt;.attributes.category_id,&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; symbol: symbol&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; query = new Query();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; query.objectIds = inBuffer;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; (function (featureLayer) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function (results) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; featureLayer.refresh();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; })(featureLayer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although within the polygon, the results are returned, the related records outside the polygon are also being shown. I was wondering if someone could let me know if there are something else that I should care about. I am not going to use graphic layer to store the returned result because I want to keep things simple, with only 1 feature layer, thanks you.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="related_color_also_selected.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/39723_related_color_also_selected.png" style="width: 620px; height: 404px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 10:11:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-best-practice-for-using/m-p/17347#M1618</guid>
      <dc:creator>StephenLam</dc:creator>
      <dc:date>2014-12-12T10:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: what is the best practice for using ClassBreaksRender in buffer searching?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-best-practice-for-using/m-p/17348#M1619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stephen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; That sample uses a Featurelayer that is already drawing ALL the layers feature and then just selecting the features that intersect the buffer and applies a symbol to the selected features. The way That I suggest that you go is to change the FeatureLayer to MODE_SELECTION that way none of the feature show until your buffer is done and then all your other code will be fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 21:14:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-best-practice-for-using/m-p/17348#M1619</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-12-12T21:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: what is the best practice for using ClassBreaksRender in buffer searching?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-best-practice-for-using/m-p/17349#M1620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 07:03:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-is-the-best-practice-for-using/m-p/17349#M1620</guid>
      <dc:creator>StephenLam</dc:creator>
      <dc:date>2015-01-16T07:03:43Z</dc:date>
    </item>
  </channel>
</rss>

