Public Function GetFeatureDrawOrder() As List(Of CIMFeatureSortInfo)
public List<CIMFeatureSortInfo> GetFeatureDrawOrder()
Public Function GetFeatureDrawOrder() As List(Of CIMFeatureSortInfo)
public List<CIMFeatureSortInfo> GetFeatureDrawOrder()
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
{
//Within QueuedTask.Run()
if (featureLayer.GetIsFeatureDrawOrderSupported())
{
//Provide the field name to use and the sort ordering
//The field must exist on the layer. Check the field can be used first
if (featureLayer.GetCanSetFeatureDrawOrder("Police_Precinct", SortOrderType.Ascending))
{
//Set the FDO to use the "Police_Precinct" field and ascending sort order
featureLayer.SetFeatureDrawOrder("Police_Precinct", SortOrderType.Ascending);
}
}
}
{
//Within QueuedTask.Run()
if (featureLayer.GetIsFeatureDrawOrderSupported())
{
var cimFeatSortInfo = featureLayer.GetFeatureDrawOrder();
var c = 0;
System.Diagnostics.Debug.WriteLine("Feature Sort Info:");
foreach (var fs_info in cimFeatSortInfo)
{
System.Diagnostics.Debug.WriteLine(
$"fs_info[{c++}] {fs_info.FieldName}: {fs_info.SortDirection.ToString()}");
}
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)