I already have a FeatureLayer with Callout on SceneView, and I want to change the style of Callout, but it doesn't seem to be updated on SceneView.
This is my updated Callout style code: ↓
// get featureLayer.labelingInfo's cloned class
const labelingInfoCache = peaks.labelingInfo[0].clone()
// get featureLayer.labelingInfo.symbol cloned class
const symbol = labelingInfoCache.symbol.clone()
// disconnect from featurelayer
peaks.labelingInfo = null
// update properties
symbol.symbolLayers.at(0).material = {
color: [Math.random() * 255, Math.random() * 255, Math.random() * 255],
}
symbol.callout = {
type: "line",
color: [Math.random() * 255, Math.random() * 255, Math.random() * 255],
border: {
color: [Math.random() * 255, Math.random() * 255, Math.random() * 255]
}
}
// Link to featurelayer to enable updates in sceneView
setTimeout(() => {
labelingInfoCache.symbol = symbol
peaks.labelingInfo = [labelingInfoCache]
})
Every time I run these codes, I can see an update in the color of the Label text (by material.color), but the Callout for the Label is not updated.
How can I see updates on SceneView?