调用高亮的关键代码:
let graphictruck = new mars3d.graphic.ModelEntity({
position: [116.327881, 31.018378, 5000],
style: {
url: '//data.mars3d.cn/gltf/mars/qiche.gltf',
heading: 90,
scale: 0.9,
minimumPixelSize: 300,
},
clampToGround: true
})
graphicLayer.addGraphic(graphictruck);
$("#btnSelPoint").click(function () {
graphictruck.openHighlight({
silhouette: true,
silhouetteColor: "#00ffff",
silhouetteSize: 8,
})
});
$("#btnUnSelPoint").click(function () {
graphictruck.closeHighlight()
});