<?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 Generalization of Features and Search Widget in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/generalization-of-features-and-search-widget/m-p/1075208#M21046</link>
    <description>&lt;P&gt;Does anyone understand the line below in the&amp;nbsp;&lt;SPAN&gt;_onSelectResult method&amp;nbsp;&lt;/SPAN&gt;in the Widget.js file of&amp;nbsp;the Search widget in Web AppBuilder?&amp;nbsp; I am trying to learn about graphics and generalization.&amp;nbsp; The first thing I wanted to understand is why the highlights in the Search widget are greatly simplified.&amp;nbsp; I have a 61 vertex pipeline that was simplified to 6 vertices and it is very jagged.&amp;nbsp; So, I am going through the code and trying to understand it.&amp;nbsp; As part of that process, I ran across this code as a possible clue.&amp;nbsp; I want to know why selectedFeature is simplified and resultFeature is not.&amp;nbsp; resultFeature appears to come from the on select result event.&amp;nbsp; selectedFeature comes from layer.queryFeatures.&amp;nbsp; I even tried to set maxAllowableOffset on featureQuery and I still got a simplified feature for selectedFeature.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;layer.queryFeatures(featureQuery, lang.hitch(this, function(featureSet) {
                var selectedFeature = null;
                if(featureSet &amp;amp;&amp;amp; featureSet.features.length &amp;gt; 0) {
                  selectedFeature = featureSet.features[0];
                  // working around for js-api's generalization.
                  //   incorrect geometry of polygon result of queryFeatures.
                  selectedFeature.geometry = resultFeature.geometry;

                  this._loadInfoTemplateAndShowPopup(layerInfo, selectedFeature, e);
                }
              }), lang.hitch(this, function() {
                // show popupInfo of searchResult.
                var selectedFeature = resultFeature;
                this._loadInfoTemplateAndShowPopup(layerInfo, selectedFeature, e);
              }));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated towards understanding the Esri developer's comment on generalization or why the Search widget highlights are generalized.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jul 2021 16:09:00 GMT</pubDate>
    <dc:creator>NathanHeickLACSD</dc:creator>
    <dc:date>2021-07-02T16:09:00Z</dc:date>
    <item>
      <title>Generalization of Features and Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/generalization-of-features-and-search-widget/m-p/1075208#M21046</link>
      <description>&lt;P&gt;Does anyone understand the line below in the&amp;nbsp;&lt;SPAN&gt;_onSelectResult method&amp;nbsp;&lt;/SPAN&gt;in the Widget.js file of&amp;nbsp;the Search widget in Web AppBuilder?&amp;nbsp; I am trying to learn about graphics and generalization.&amp;nbsp; The first thing I wanted to understand is why the highlights in the Search widget are greatly simplified.&amp;nbsp; I have a 61 vertex pipeline that was simplified to 6 vertices and it is very jagged.&amp;nbsp; So, I am going through the code and trying to understand it.&amp;nbsp; As part of that process, I ran across this code as a possible clue.&amp;nbsp; I want to know why selectedFeature is simplified and resultFeature is not.&amp;nbsp; resultFeature appears to come from the on select result event.&amp;nbsp; selectedFeature comes from layer.queryFeatures.&amp;nbsp; I even tried to set maxAllowableOffset on featureQuery and I still got a simplified feature for selectedFeature.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;layer.queryFeatures(featureQuery, lang.hitch(this, function(featureSet) {
                var selectedFeature = null;
                if(featureSet &amp;amp;&amp;amp; featureSet.features.length &amp;gt; 0) {
                  selectedFeature = featureSet.features[0];
                  // working around for js-api's generalization.
                  //   incorrect geometry of polygon result of queryFeatures.
                  selectedFeature.geometry = resultFeature.geometry;

                  this._loadInfoTemplateAndShowPopup(layerInfo, selectedFeature, e);
                }
              }), lang.hitch(this, function() {
                // show popupInfo of searchResult.
                var selectedFeature = resultFeature;
                this._loadInfoTemplateAndShowPopup(layerInfo, selectedFeature, e);
              }));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated towards understanding the Esri developer's comment on generalization or why the Search widget highlights are generalized.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 16:09:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/generalization-of-features-and-search-widget/m-p/1075208#M21046</guid>
      <dc:creator>NathanHeickLACSD</dc:creator>
      <dc:date>2021-07-02T16:09:00Z</dc:date>
    </item>
  </channel>
</rss>

