放大到指定范围-ArcGlobe和C#

     开始接触ArcGlobe了,在网上很少相关方面的资料,无论是操作还是二次开发的,都很少,对于我这样一个熟悉二维开发却没有接触过三维开发的人员来说,很是郁闷。

     没有办法,只有自己一点点摸索了,结合类库图以及网上的少有的点点博文,开始了自己的漫长探索之路~

 

 IPoint pt = feat.Shape as IPoint;
IEnvelope env = pt.Envelope;
env.PutCoords(env.XMin - 0.005, env.YMin - 0.005, env.XMax+0.005, env.YMax+0.005);
//pGlobe is a variable of type IGlobe
IGlobeDisplay pGlbDisplay = this.axGlobeControl1.Globe.GlobeDisplay;
//get the ActiveViewer
 ISceneViewer pViewer = pGlbDisplay.ActiveViewer;
 //get the Camera of the current viewer
ICamera pCamera = pViewer.Camera;
//Set the GlobeCamera to the camera of the ActiveViewer
IGlobeCamera pGlobeCamera = (IGlobeCamera)pCamera;
ISceneViewer sceneViewer = pGlbDisplay.ActiveViewer;
pGlobeCamera.SetToZoomToExtents(env, this.axGlobeControl1.Globe, sceneViewer); 

 

你可能感兴趣的:(arc)