Hello All,
I'm constructing a Graphic and the geometry type is not recognized by TypeScript, saying
Type '{ type: string; rings: number[][][]; }' is not assignable to type 'GeometryProperties'.
Object literal may only specify known properties, and 'type' does not exist in type 'GeometryProperties'.ts(2322)
arcgis-js-api.d.ts(7670, 5): The expected type comes from property 'geometry' which is declared here on type 'GraphicProperties'
It looks to me as if the Geometry type definition should allow this. Sample code below:
const hexGraphic = new Graphic({
geometry: {
type: 'polygon',
rings: [[
[-116.83830158928454, 32.26038282119406],
[-115.25400548040932, 33.43153649157358],
[-115.64454936135779, 35.138559675017866],
[-117.66644115562842, 35.657119683574905],
[-119.2405536967384, 34.468622114983724],
[-118.8045281400983, 32.77943799663874],
[-116.83830158928454, 32.26038282119406]
]]
},
attributes: {
h3: '8229a7fffffffff',
count: 17324
},
symbol: simpleFillSymbol,
popupTemplate: graphicPopupTemplate
})