Bug-ID-Nummer |
BUG-000126736 |
Eingereicht | November 13, 2019 |
Zuletzt geändert | June 5, 2024 |
Gilt für | ArcGIS Pro SDK for .NET |
Gefunden in Version | N/A |
Betriebssystem | Windows OS |
Betriebssystemversion | 10.0 64 Bit |
Status | Will Not Be Addressed
Das Entwicklungsteam hat das Problem bzw. die Anforderung sorgfältig geprüft und ist zu dem Schluss gekommen, es nicht zu beheben bzw. keine weiteren Schritte zu unternehmen. Weitere Erläuterungen finden Sie ggf. im Abschnitt "Zusätzliche Informationen" des jeweiligen Problems.
|
Zusätzliche Informationen
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"); } } });```
Workaround
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
Schritte zur Reproduzierung