Here is the documentation for the API:
size | ArcGIS API for JavaScript 4.13
For my map, it generates 'simple-marker' for the symbol.
But I need 'simple-fill'.
Is there a way to specify that by passing in something?
I can modify the actual renderer instance after it is generated. But I think it is hackish.
I think this is a much needed feature nonetheless.
<SPAN class="keyword token">var</SPAN> layer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">FeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>
url<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/counties_politics_poverty/FeatureServer/0"</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// visualization based off Arcade expression</SPAN>
<SPAN class="keyword token">var</SPAN> sizeParams <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN>
layer<SPAN class="punctuation token">:</SPAN> layer<SPAN class="punctuation token">,</SPAN>
classificationMethod<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"equal-interval"</SPAN><SPAN class="punctuation token">,</SPAN>
valueExpression<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"($feature.POP_POVERTY / $feature.TOTPOP_CY) * 100"</SPAN><SPAN class="punctuation token">,</SPAN>
view<SPAN class="punctuation token">:</SPAN> view<SPAN class="punctuation token">,</SPAN>
legendOptions<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
title<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"% of people living in poverty"</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// when the promise resolves, apply the renderer to the layer</SPAN>
sizeRendererCreator<SPAN class="punctuation token">.</SPAN><SPAN class="token function">createClassBreaksRenderer</SPAN><SPAN class="punctuation token">(</SPAN>sizeParams<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="token function">then</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>response<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
layer<SPAN class="punctuation token">.</SPAN>renderer <SPAN class="operator token">=</SPAN> response<SPAN class="punctuation token">.</SPAN>renderer<SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>