usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingTerraexplorerx;////////Set a message for the 3DML monomer object
Zhao He
namespacedxskyline{ Public Partial classform1:form {SGWorld65 globe; IMouseInfo65 mi; I3dmlfeaturelayer65 _3dmlfeaturelayer; IWorldPointInfo65 WPI; IFeature65 thefeature; stringLastID; intfpslimitation; intFramesnr; //IMeshLayer65 ml; PublicForm1 () {InitializeComponent (); Globe=NewSGWorld65 (); Fpslimitation=Ten; } voidGlobe_onframe () {Framesnr++; if(Framesnr <fpslimitation) { return; } Mi=Globe. Window.getmouseinfo (); WPI=Globe. Window.pixeltoworld (mi. X, MI. Y); if(WPI. Type = = (Worldpointtype)8192&& LastID! = WPI. ObjectID && WPI. objectid!="") {thefeature=(IFEATURE65) globe. Projecttree.getobject (WPI. ObjectID); _3dmlfeaturelayer=(I3DMLFEATURELAYER65) globe. Projecttree.getobject (THEFEATURE.PARENTGROUPID); //_3dmlfeaturelayer.featureproperties.tooltip.text = TheFeature.FeatureAttributes.GetFeatureAttribute ("Building Properties"). Value; //WPI. ObjectID;ITerraExplorerMessage65 mm = globe. Creator.createmessage (Msgtargetposition.mtp_popup,"www.baidu.com?"+ TheFeature.FeatureAttributes.GetFeatureAttribute ("Building Properties"). Value, Msgtype.type_url); _3dmlfeaturelayer.featureproperties.messageid=mm.id; LastID=WPI. ObjectID; } Framesnr=0; } Private voidForm1_Load (Objectsender, EventArgs e) { } Private voidtextBox1_TextChanged (Objectsender, EventArgs e) {fpslimitation=int. Parse (TextBox1.Text); Framesnr=0; Console.WriteLine ("FPS limitation changed:"+fpslimitation); } Private voidButton1_Click (Objectsender, EventArgs e) {Globe. Onframe+=New_isgworld65events_onframeeventhandler (globe_onframe); } Private voidButton2_Click (Objectsender, EventArgs e) {Globe. Onframe-=New_isgworld65events_onframeeventhandler (globe_onframe); } }}
Resolves external web page hook problems after 3DML model skyline in version 6.5