SuperMap.Web.UI.Action3Ds.DrawArea = function(sceneControl){
SuperMap.Web.UI.Action3Ds.DrawArea.initializeBase(this);
this._name = "DrawAreaAction";
this._sceneControl = sceneControl;
this._type = SuperMap.Web.UI.Action3Ds.SceneActionType.PAN;
};
SuperMap.Web.UI.Action3Ds.DrawArea.prototype ={
dispose:function(){
this._sceneControl = null;
},
onMouseDown:function(e)
{
var point = new SuperMap.Web.Core.Point3D(e.get_longitude(),e.get_latitude(),0);
if(this._Point3Ds.get_count() > 0){
this._Point3Ds.insert(point,this._Point3Ds.get_count()-1);
}else{
this._Point3Ds.add(point);
this._Point3Ds.add(point);
}
var geoPoint = new SuperMap.Web.Core.GeoPoint3D(geoPoint);
var feature = new SuperMap.Web.Core.Feature3D();
var style3D = new SuperMap.Web.Core.Style3D();
feature.set_geometry(geoPoint);
//定义节点颜色
style3D.set_markerColor(new SuperMap.Web.Core.Color(255, 0, 255, 225));
style3D.set_markerScale(5);
feature.set_style3D(style3D);
}
};
SuperMap.Web.UI.Action3Ds.DrawArea.registerClass('SuperMap.Web.UI.Action3Ds.DrawArea',SuperMap.Web.UI.Action3Ds.SceneAction,Sys.IDisposable);
drawAreaAction = new SuperMap.Web.UI.Action3Ds.DrawArea(sceneControl);
sceneControl.set_sceneAction(drawAreaAction);
鼠标键按下不触onMouseDown发事件