void axRenderControl1_RcMouseDragSelect(IPickResultCollection PickResults, gviModKeyMask Mask) { IPickResultCollection prc = PickResults; if (prc == null) { return; } Hashtable fcEnvMap = new Hashtable(); this.axRenderControl1.FeatureManager.UnhighlightAll(); for (int i = 0; i < prc.Count; i++) { IPickResult pr = prc.Get(i); if (pr.Type == gviObjectType.gviObjectFeatureLayer) { IFeatureLayerPickResult flpr = pr as IFeatureLayerPickResult; int fid = flpr.FeatureId; IFeatureLayer fl = flpr.FeatureLayer; foreach (IFeatureClass fc in fcMap.Keys) { if (fc.Guid.Equals(fl.FeatureClassId)) { this.axRenderControl1.FeatureManager.HighlightFeature(fc, fid, System.Drawing.Color.Yellow); if (fcEnvMap.ContainsKey(fc)) { List <int> fids = fcEnvMap[fc] as List <int>; fids.Add(fid); fcEnvMap.Remove(fc); fcEnvMap.Add(fc, fids); } else { List <int> fids = new List <int>(); fids.Add(fid); fcEnvMap.Add(fc, fids); fcGUIDs.Add(fc.Guid); } } } } } // 计算Envelope env = null; foreach (IFeatureClass fc in fcEnvMap.Keys) { List <int> fids = fcEnvMap[fc] as List <int>; if (env == null) { env = fc.GetFeaturesEnvelope(fids.ToArray(), "Geometry"); } else { env.ExpandByEnvelope(fc.GetFeaturesEnvelope(fids.ToArray(), "Geometry")); } } // 设定出图参数 switch (type) { case ExportType.Export25D: { Export25D(); } break; case ExportType.ExportDEM: { ExportDEM(); } break; case ExportType.ExportDOM: { ExportDOM(); } break; case ExportType.ExportOrthoImage: { ExportOrthoImage(); } break; } // 恢复漫游模式 this.axRenderControl1.InteractMode = gviInteractMode.gviInteractNormal; }