IMapControl::CenterAt method changes the map scale.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM034193
已提交
April 11, 2008
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
编程语言
C#
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.
解决办法
Get the MapScale prior to the call to CenterAt and then set the MapScale back to that scale in the code after using CenterAt: private void button1_Click(object sender, EventArgs e) { try { double dX; double dY; //Modify these values as necessary, according to the data dX = -25793.07; dY = 498076.5; ESRI.ArcGIS.Geometry.IPoint centerPoint = new ESRI.ArcGIS.Geometry.PointClass(); centerPoint.PutCoords(dX, dY); double mapScale = axMapControl1.MapScale; axMapControl1.CenterAt(centerPoint); axMapControl1.MapScale = mapScale; } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message.ToString()); } }