function getInfo(){
//设置控件的当前操作为自定义操作
debugger;
var myAction2 = new SuperMap.Web.UI.Action3Ds.MyAction2(sceneControl);
sceneControl.set_sceneAction(myAction2);
}
SuperMap.Web.UI.Action3Ds.MyAction2 = function(sceneControl) {
debugger;
/* <param name="sceneControl" type="SuperMap.Web.UI.Controls.SceneControl"></param> */
SuperMap.Web.UI.Action3Ds.MyAction2.initializeBase(this);
this._name = "myAction2";
this._sceneControl = sceneControl;
//对应的场景操作类型为漫游
this._type = SuperMap.Web.UI.Action3Ds.SceneActionType.POINTSELECT;
};
//扩展Action的属性和方法
SuperMap.Web.UI.Action3Ds.MyAction2.prototype = {
/*
* 析构方法
*/
dispose:function() {
///<returns type="void"></returns>
this._sceneControl = null;
},
/*
* 鼠标单击方法
*/
onMouseDown:function(e) {
//这里无法触发
alert(e);
var x = e.get_clientX();
var y = e.get_clientY();
var point=new SuperMap.Pixel(x,y);
var select = scene.get_trackingLayer3D().hitTest(point);
鼠标点击无效.....