ArcGis实现Pan

public overridevoid OnMouseDown(int Button, int Shift, int X, int Y) { // TODO:  Add Tool1.OnMouseDownimplementation           screenDisplay =m_hookHelper.ActiveView.ScreenDisplay; IPoint point1 = new PointClass(); point1 = screenDisplay.DisplayTransformation.ToMapPoint(X,Y); screenDisplay.PanStart(point1); }        public overridevoid OnMouseMove(int Button, int Shift, int X, int Y) { // TODO:  Add Tool1.OnMouseMoveimplementation IPoint point2 = new PointClass(); point2 = screenDisplay.DisplayTransformation.ToMapPoint(X,Y); screenDisplay.PanMoveTo(point2); }        public overridevoid OnMouseUp(int Button, int Shift, int X, int Y) { // TODO:  Add Tool1.OnMouseUpimplementation IEnvelope envelope = new EnvelopeClass(); envelope=screenDisplay.PanStop(); IActiveView activeView = m_hookHelper.ActiveView; activeView.Extent = envelope; activeView.Refresh(); }
posted @ 2012-07-16 18:04  adodo1  Views(147)  Comments(0Edit  收藏  举报