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()); } }