// Get the screen point from the view's click event
view.on("click", function (event) {
// Search for graphics at the clicked location. View events can be used
// as screen locations as they expose an x,y coordinate that conforms
// to the ScreenPoint definition.
view.hitTest(event).then(function (response) {
if (response.results.length) {
var graphic = response.results.filter(function (result) {
// check if the graphic belongs to the layer of interest
return result.graphic.layer === graphicLayer;
})[0].graphic;
//点击点时,点属性栏出现
var myattributes;
myattributes = graphic.attributes.number;
//点击时,弹窗出现
//重置
moveOffset=0;
document.getElementsByClassName("container")[0].style.bottom="0";
// moveOffset=0;
}
});
});
效果:


被折叠的 条评论
为什么被折叠?



