<?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: Help with SimpleRenderer using React, TypeScript, and ESM in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-simplerenderer-using-react-typescript/m-p/1031469#M71885</link>
    <description>&lt;P&gt;Well that totally worked!!&amp;nbsp; Working with typescript and react is definitely a learning curve for me.&amp;nbsp; Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;			const simpleFillSymbol = new SimpleFillSymbol({
				style: "solid",
				color: "white",
				outline: {
					color: "black",
					width: 1,
				},
			});

			const renderer = new SimpleRenderer({
				symbol: simpleFillSymbol,
			});



			const myLayer = new GeoJSONLayer({
				url: url,
				geometryType: "polygon",
				outFields: ["*"],
				popupTemplate: template,
				opacity: 0.7,
				renderer: renderer,
				
			});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 13:46:58 GMT</pubDate>
    <dc:creator>dogWater</dc:creator>
    <dc:date>2021-03-01T13:46:58Z</dc:date>
    <item>
      <title>Help with SimpleRenderer using React, TypeScript, and ESM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-simplerenderer-using-react-typescript/m-p/1031178#M71879</link>
      <description>&lt;P&gt;So I am using React, and Typescript and just trying to use the SimpleRenderer to give a geoJSONlayer a different color then the default.&amp;nbsp; I have found that this works using esri-loader but not ESM&amp;nbsp; this should be a simple thing but I really could use some help. &amp;nbsp; and it is saying that 'type'.&amp;nbsp; I have put a snip of my code below.&amp;nbsp; Thoughts on why it would choke on type in the renderer?&amp;nbsp; from the API I think this should be right but maybe not in ESM and TS.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;No overload matches this call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Overload 1 of 2, '(properties?: SimpleRendererProperties | undefined): SimpleRenderer', gave the following error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Type '{ type: string; color: string; outline: { color: string; width: number; }; }' is not assignable to type 'SymbolProperties'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object literal may only specify known properties, and 'type' does not exist in type 'SymbolProperties'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Overload 2 of 2, '(properties?: SimpleRendererProperties | undefined): SimpleRenderer', gave the following error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Type '{ type: string; color: string; outline: { color: string; width: number; }; }' is not assignable to type 'SymbolProperties'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object literal may only specify known properties, and 'type' does not exist in &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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; const renderer = new SimpleRenderer({
                symbol:{
                    type: "simple-fill",
                    color: "white",
                    outline:{
                        color: "black",
                        width: 1
                    }
                }
            })

         

            const myLayer = new GeoJSONLayer({
                url: url,
                geometryType: "polygon",
                outFields: ["*"],
                popupTemplate: template,
                opacity: 0.7,
                renderer: renderer
                    
            });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 22:14:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-simplerenderer-using-react-typescript/m-p/1031178#M71879</guid>
      <dc:creator>dogWater</dc:creator>
      <dc:date>2021-02-26T22:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SimpleRenderer using React, TypeScript, and ESM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-simplerenderer-using-react-typescript/m-p/1031198#M71880</link>
      <description>&lt;P&gt;TypeScript doesn't like autocasting. So you would need to new up a new SimpleFillSymbol().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not ESM, it has to do with TypeScript not allowing different types for getter/setters.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 22:34:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-simplerenderer-using-react-typescript/m-p/1031198#M71880</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-02-26T22:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SimpleRenderer using React, TypeScript, and ESM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-simplerenderer-using-react-typescript/m-p/1031469#M71885</link>
      <description>&lt;P&gt;Well that totally worked!!&amp;nbsp; Working with typescript and react is definitely a learning curve for me.&amp;nbsp; Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;			const simpleFillSymbol = new SimpleFillSymbol({
				style: "solid",
				color: "white",
				outline: {
					color: "black",
					width: 1,
				},
			});

			const renderer = new SimpleRenderer({
				symbol: simpleFillSymbol,
			});



			const myLayer = new GeoJSONLayer({
				url: url,
				geometryType: "polygon",
				outFields: ["*"],
				popupTemplate: template,
				opacity: 0.7,
				renderer: renderer,
				
			});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 13:46:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-simplerenderer-using-react-typescript/m-p/1031469#M71885</guid>
      <dc:creator>dogWater</dc:creator>
      <dc:date>2021-03-01T13:46:58Z</dc:date>
    </item>
  </channel>
</rss>

