Hi,
I'm trying to create FetureLayer using client-side graphics. here is my code;
Are you rendering 2D polygons ? Or Points?
https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html
Can you share a snippet of your graphics?
Is there any reason why typing ObjectID as a string and not type: "oid"
I'm rendering 2D polygons. I have no reason to type objectid as a string, i changed it to 'oid' but nothing changed, still not working.
The code i shared works version 4.18
I'll share a snippet of my graphics.
Is there any problem with symbol? I really can't understand.
Hi there,
Your codepen has an issue. You are directly assigning the symbol the layer's renderer. If you open the console you will see the error. Here is your codepen app updated.
The changes are:
const renderer = {
type: "simple",
symbol: symbol
};
var fl = new FeatureLayer({
source: features,
renderer: renderer, // change this from symbol to renderer
...
});
Hope this helps,
-Undral