<?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: Apply unique value symbology to a feature layer in custom widget in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1162865#M4129</link>
    <description>&lt;P&gt;Hi KisakyeM,&lt;/P&gt;&lt;P&gt;Please find my modified codes which it's solved, noted that you have to modify both setting.tsx and widget.tsx and then select data source and map object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your setting.tsx, I saw you disable the &amp;lt;MapWidgetSelector&amp;gt;, which I think you would need to enable it, and then you can select the Map Object for using before launching app. Then in you widget.tsx, firstly you need to set up&amp;nbsp;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;JimuMapViewComponent&amp;gt;, and then&amp;nbsp;&lt;/SPAN&gt;you would need to write additional lines of code to add layer into the Map Object after you select the option for rendering the symbologies, cuz I didn’t see you have codes adding the layer into the Map Object, I think this is the reason why you can’t see MapView got updated the symbology based on your selected field.&lt;/P&gt;</description>
    <pubDate>Sun, 10 Apr 2022 12:43:35 GMT</pubDate>
    <dc:creator>mileslee_esri</dc:creator>
    <dc:date>2022-04-10T12:43:35Z</dc:date>
    <item>
      <title>Apply unique value symbology to a feature layer in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1160921#M4080</link>
      <description>&lt;P&gt;I am new to experience builder and javascript as a whole so please bear with me. I am creating a custom widget that will apply unique value symbols to a feature layer (set in the settings file of the widget) based on a given field. So far I have been able to access the feature layer on line 13 but I am unsure how to apply the symbology on the feature layer. On the returned feature layer's methods, I didn't see any method to set the renderer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; /** @jsx jsx */
 import { React, AllWidgetProps, jsx, DataSourceComponent,
SqlQueryParams, DataSourceManager, QueriableDataSource,
DataSource } from "jimu-core";
 import { JimuMapViewComponent, JimuMapView, FeatureLayerDataSource } from "jimu-arcgis";
 import Point from "esri/geometry/Point";
 import { Button } from 'jimu-ui'
 export default class Widget extends React.PureComponent&amp;lt;AllWidgetProps&amp;lt;any&amp;gt;, any&amp;gt; 
 {
 
  onButtonClicked = e =&amp;gt; {
    const datasrc=this.props.useDataSources[0]
    const fl=DataSourceManager.getInstance().getDataSource(datasrc.dataSourceId) as FeatureLayerDataSource
    //need to set a renderer to fl here
  }

   render() {
     return &amp;lt;div className="widget-starter jimu-widget"&amp;gt;
        &amp;lt;DataSourceComponent 
          useDataSource={this.props.useDataSources[0]}
          widgetId={this.props.id}
        /&amp;gt;

        &amp;lt;Button onClick={this.onButtonClicked} size="default"&amp;gt;
          Button
        &amp;lt;/Button&amp;gt;
      &amp;lt;/div&amp;gt;;
   }
 }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/124928"&gt;@Jianxia&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/320"&gt;@GavinRehkemper&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/469014"&gt;@milesleeaus&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/236124"&gt;@EmilieRabeau&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/974"&gt;@SpatialNinja&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/4655"&gt;@TonghuiMing&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/15530"&gt;@RhettZufelt&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/54255"&gt;@ShengdiZhang&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/109662"&gt;@ZhifangWang&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/36532"&gt;@DaveFullerton&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/123963"&gt;@DavidMartinez&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 20:04:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1160921#M4080</guid>
      <dc:creator>KisakyeM</dc:creator>
      <dc:date>2022-04-04T20:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Apply unique value symbology to a feature layer in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1162033#M4103</link>
      <description>&lt;P&gt;Hi KisakyeM,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my working account for my personal account&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/469014"&gt;@milesleeaus&lt;/a&gt;, if you haven't solved this issue yet, would you please send me your completed widget folder about this question via my work email: &lt;A href="mailto:mlee@esriaustralia.com.au" target="_blank" rel="noopener"&gt;mlee@esriaustralia.com.au&lt;/A&gt;&amp;nbsp; let's see what we can help you with ! Also let us know your EXB dev edition version, 1.7 right I guess !&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 13:04:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1162033#M4103</guid>
      <dc:creator>mileslee_esri</dc:creator>
      <dc:date>2022-04-07T13:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Apply unique value symbology to a feature layer in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1162165#M4110</link>
      <description>&lt;P&gt;I sent the code to the email that you posted. Thank you. And yes. I am using ExB version 1.7.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:40:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1162165#M4110</guid>
      <dc:creator>KisakyeM</dc:creator>
      <dc:date>2022-04-07T15:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Apply unique value symbology to a feature layer in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1162865#M4129</link>
      <description>&lt;P&gt;Hi KisakyeM,&lt;/P&gt;&lt;P&gt;Please find my modified codes which it's solved, noted that you have to modify both setting.tsx and widget.tsx and then select data source and map object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your setting.tsx, I saw you disable the &amp;lt;MapWidgetSelector&amp;gt;, which I think you would need to enable it, and then you can select the Map Object for using before launching app. Then in you widget.tsx, firstly you need to set up&amp;nbsp;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;JimuMapViewComponent&amp;gt;, and then&amp;nbsp;&lt;/SPAN&gt;you would need to write additional lines of code to add layer into the Map Object after you select the option for rendering the symbologies, cuz I didn’t see you have codes adding the layer into the Map Object, I think this is the reason why you can’t see MapView got updated the symbology based on your selected field.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2022 12:43:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/apply-unique-value-symbology-to-a-feature-layer-in/m-p/1162865#M4129</guid>
      <dc:creator>mileslee_esri</dc:creator>
      <dc:date>2022-04-10T12:43:35Z</dc:date>
    </item>
  </channel>
</rss>

