//获取鼠标点击的像素坐标
function mouseClick(e){
var x,y;
var e = e||window.event;
x = e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
y = e.clientY+document.body.scrollTop+document.documentElement.scrollTop;
console.log(x+","+y);
return {
x:x,
y:y
};
};
viewer.click(function(event){
var windowPosition = mouseClick(event);
console.log(windowPosition);
});