阅读:1153回复:0
c#&mapx的开发(仅供参考)
c#中的根据FeatureID来定位地图代码
try { FeatureClass fea =new MapXLib.FeatureClass (); fea= (MapXLib.FeatureClass )axMap1.Layers._Item(1).GetFeatureByID (Convert.ToInt32 (textBox1.Text )); axMap1.Layers._Item(1).Selection.Replace(fea); //fea.Style .ExportSymbolSample (@"d:\mm.gif",MapXLib.ExportFormatConstants.miFormatGIF ,12,12,23); axMap1.CenterX =fea.CenterX ; axMap1.CenterY =fea.CenterY ; axMap1.Layers._Item (1).Editable =true; } catch(Exception o) { MessageBox.Show("请您先输入图元ID号" ); } |
|