杜杜先生
路人甲
路人甲
  • 注册日期2004-01-02
  • 发帖数137
  • QQ
  • 铜币574枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1154回复:0

c#&mapx的开发(仅供参考)

楼主#
更多 发布于:2004-02-11 08:33
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号" );


}
喜欢0 评分0
游客

返回顶部