I'm testing the Javascript API for a project and am trying to place some features on a featurelayer as an array of client-side features. Normal polygons work well, but I can't find the correct way of placing a circle (extruded to make a 3D cylinder). In my mind the array would look something like this:
const cylFeatures = [
{
geometry: {
type: 'circle',
center: [10.296842,61.313066],
},
attributes: {
objectID: 200,
elevation: 390,
height: 5,
width: 12
}
}
]
And then use unique value renderer to apply the width, height and elevation to the circle features. But this doesn't work of course. According to the documentation it seems like I can't use the circle type at all here.
I'm looking for clues to how I can do this.
For 3d points, you'll want to use an ObjectSymbol3DLayer. Here is a sample showing how it works.
Thank you for your reply! I will look into this solution. For now I have made my cylinder by making a circular polygon (using turf.js) and extruding that.