laptop and a wrench

不具合

Map::SetExtent does not work consistently when the aspect ratio of the new extent differs from the map display's aspect ratio.

最後に公開された状態: August 25, 2014 ArcGIS Runtime for Windows Mobile
不具合 ID 番号 NIM038935
送信されましたOctober 1, 2008
最終更新日June 5, 2024
適用対象ArcGIS Runtime for Windows Mobile
見つかったバージョン9.3
オペレーティング システムWindows OS
オペレーティング システムのバージョンXP
修正されたバージョンN/A
ステータスFixed

対処法

For code to work in all aspect ratios try the following code- // Assign the new envelope to be the map's envelopedouble dWHAspect = Convert.ToDouble(theMap.Width) / Convert.ToDouble(theMap.Height);double dWHExtent = envelope.Width / envelope.Height;if (dWHAspect > dWHExtent){ // make width wider double dCenterX = envelope.MinX + (envelope.MaxX - envelope.MinX) / 2; double dCenterY = envelope.MinY + (envelope.MaxY - envelope.MinY) / 2; double dHeight = envelope.MaxY - envelope.MinY; double dWidth = dHeight * dWHAspect; envelope = new Envelope(new Coordinate(dCenterX, dCenterY), dWidth, dHeight);}else{ // make height wider double dCenterX = envelope.MinX + (envelope.MaxX - envelope.MinX)/2; double dCenterY = envelope.MinY + (envelope.MaxY - envelope.MinY) / 2; double dWidth = envelope.MaxX - envelope.MinX; double dHeight = dWidth / dWHAspect; envelope = new Envelope(new Coordinate(dCenterX, dCenterY), dWidth, dHeight);}envelope.Resize(1.5);theMap.SetExtent(envelope);theMap.Invalidate();

再現の手順

不具合 ID: NIM038935

ソフトウェア:

  • ArcGIS Runtime for Windows Mobile

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動