4.6前端api三维物体高亮显示

我有个featureLayer 在前端给3D样式服务 拉成三维效果,想单击后高亮显示,该怎么实现, 图中效果是单击是弹出popup自动高亮的,我想不要popup自动高亮 如何实现
已邀请:

许丹石

赞同来自:

【解决办法】:
var highlight;
view.on(click,function(event){
if(highlight){
highlight.remove();
}
view.hitTest(event).then(function(response){
if(response.results[0]){
var graphic = response.results[0].graphic;
view.whenLayerView(graphic.layer).then(function(lyrView){
highlight = lyrView.highlight(graphic);
})
}
})
});

 

要回复问题请先登录注册