I would like to ask, when using MapImageLayer, identify clicks on the feature, how can I make the data in MapImageLayer have a highlight display?
The following is the general usage of featurelayer.
view.whenLayerView(feature).then(function (layerView) {
highlight?.remove();
highlight = layerView.highlight(id);
});
The following hack worked for me
// Tested in ArcGIS JS SDK 4.27.6
const map = new Map({ ... });
const view = new MapView({ ... });
const mapImageLayer = new MapImageLayer({ ... });
map.add(mapImageLayer);
await mapImageLayer.load();
// In TypeScript, be prepared to use `any` type from here onwards
const layerView = view.layerViews.find((lv) => lw.layer.id === mapImageLayer.id);
layerView.highlight([ ... ]); // An array of Graphic object