laptop and a wrench

Erro

Some locators are not added when adding multiple locators with the ArcGIS Pro SDK for .NET.

ArcGIS Pro
Número de ID do Erro BUG-000172901
EnviadoDecember 6, 2024
Última ModificaçãoApril 9, 2025
Aplica-se àArcGIS Pro
Versão encontrada3.2.2
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
Versão Fixa3.5
StatusFixed

Informações Adicionais

The catalog view is not being refreshed after the locator(s) are added. A refresh needs to be added to the AddLocatorAsync method.

Solução Provisória

The workaround is to explicitly refresh the catalog view with a Project.Current.AddItem method. Here is an example: protected void AddLocatorsToTheProjectAsync(string dir_path) { var loc_path = System.IO.Path.Combine( dir_path, "Atlanta"); var loc_paths = new List(); var loc = $"{loc_path}.loc"; QueuedTask.Run(async () => { var i = 1; //Add the locators while (System.IO.File.Exists(loc)) { var loc_item = ItemFactory.Instance.Create(loc) as IProjectItem; if (Project.Current.AddItem(loc_item)) { loc_paths.Add(loc); } loc = $"{loc_path}{i++}.loc"; } //Retrieve the locators var locators = await MapView.Active.LocatorManager.GetLocatorInformationAsync(); foreach (var path in loc_paths) { var locator = locators.FirstOrDefault( loc => string.Compare(loc.ProviderPath, path, true) == 0); if (locator != null) { System.Diagnostics.Debug.WriteLine( $"Locator {locator.ProviderName}, {locator.ProviderPath} added"); } else { System.Diagnostics.Debug.WriteLine($"Locator {path} not added"); } } }); }

Etapas para Reproduzir

ID do Erro: BUG-000172901

Software:

  • ArcGIS Pro

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download