使用产品:supermap-iserver-9.0.1a-win64-zip 操作系统:win10 x64
问题详细描述:想要实现一个鼠标点击,但是没有产生回调
--------------------------------------------------------------------------------------------------------------------------------------------------
// 首先利用 MicrosoftAjax 框架扩展 SceneAction,扩展类名为 PositionAction SuperMap.Web.UI.Action3Ds.PositionAction = function (sceneControl) {
SuperMap.Web.UI.Action3Ds.PositionAction.initializeBase(this);
this._name = "positionAction";
this._sceneControl = sceneControl;
this._type = SuperMap.Web.UI.Action3Ds.SceneActionType.PAN;
};
SuperMap.Web.UI.Action3Ds.PositionAction.prototype = {
dispose: function () {
this._sceneControl = null;
},
// 鼠标左键按下后弹出当前鼠标所在的经纬度、高度以及相机高度的提示。其中参数 e 就是 EventObject 类型。
onMouseDown: function (e) {
console.log("经度:" + e.get_longitude() + "\n" + "纬度:" + e.get_latitude() + "\n"
+ "高度:" + e.get_altitude() + "\n" + "相机高度:" + e.get_cameraAltitude()
+ "\n" + "键值:" + e.get_flagType());
}
};
SuperMap.Web.UI.Action3Ds.PositionAction.registerClass('SuperMap.Web.UI.Action3Ds.PositionAction', SuperMap.Web.UI.Action3Ds.SceneAction, Sys.IDisposable);
var action = new SuperMap.Web.UI.Action3Ds.PositionAction(sceneControl);
sceneControl.set_sceneAction(action);
--------------------------------------------------------------------------------------------------------------------------------------------------
这个PositionAction的onMouseDown无论如何都没法调用成功,我想知道怎么才能让它弄出来