不具合 ID 番号 |
BUG-000126736 |
送信されました | November 13, 2019 |
最終更新日 | June 5, 2024 |
適用対象 | ArcGIS Pro SDK for .NET |
見つかったバージョン | N/A |
オペレーティング システム | Windows OS |
オペレーティング システムのバージョン | 10.0 64 Bit |
ステータス | Will Not Be Addressed
開発チームは、この問題またはリクエストを検討した結果、これに対処しないことに決定しました。 問題の「参考情報」セクションに、さらに詳細な説明が示されていることがあります。
|
参考情報
The correct way to accomplish the desired result is to create a map graphic. Refer to the sample code below.
``` await QueuedTask.Run(() => { var selectedFeature = MapView.Active?.Map?.GetSelection()?.ToDictionary()?.FirstOrDefault(); if (selectedFeature == null) return; var container = MapView.Active.Map.TargetGraphicsLayer; if (container == null) return; var mapMember = selectedFeature.Value.Key as FeatureLayer; var filter = new ArcGIS.Core.Data.QueryFilter() { ObjectIDs = selectedFeature.Value.Value }; using (var cursor = mapMember.Search(filter)) { while (cursor.MoveNext()) { var feature = cursor.Current as Feature; var shape = feature.GetShape(); var graphic = ElementFactory.Instance.CreatePictureGraphicElement( container, shape.Extent, @"C:\Temp\code\sdk\EsriBugShow\TestLogo.png"); } } });```
対処法
The following is the workaround of the issue:
if (graphic.GetWidth() * graphic.GetHeight() <= envelope.Area)
{
return graphic;
}
graphic.SetHeight(envelope.Height);
graphic.SetWidth(envelope.Width
再現の手順