Número de ID del error |
BUG-000126736 |
Enviado | November 13, 2019 |
Última modificación | June 5, 2024 |
Relacionado con | ArcGIS Pro SDK for .NET |
Versión encontrada | N/A |
Sistema operativo | Windows OS |
Versión de sistema operativo | 10.0 64 Bit |
Estado | Will Not Be Addressed
El equipo de desarrollo ha considerado el problema o la solicitud y ha llegado a la conclusión de que no se va a solucionar. La sección Información adicional del problema puede contener más explicaciones.
|
Información adicional
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"); } } });```
Solución alternativa
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
Pasos para reproducir