laptop and a wrench

Erro

The layers order within the Legend is not updated if the order of the layers on the map is changed.

Última Publicação: April 6, 2020 ArcGIS API for JavaScript
Número de ID do Erro BUG-000127418
EnviadoDecember 16, 2019
Última ModificaçãoJuly 20, 2025
Aplica-se àArcGIS API for JavaScript
Versão encontrada4.13
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
Versão Fixa4.15
StatusFixed

Solução Provisória

Add the additional code to reflect the changes within the Legend.

Uncomment line 39-58 in the codepen sample to see the changes:

 

if(true){

     

     LegendViewModel.prototype._addActiveLayerInfo = function(e, t) {

       if (this._isLayerActive(t) && -1 === this.activeLayerInfos.indexOf(e)) {

         var r = e.parent;

          

         if(r){ 

          if(-1 === r.children.indexOf(e)){

           r.children.push(e)

          };

          this._sortActiveLayerInfos(r.children)

         }else{ 

          this.activeLayerInfos.add(e);

          this._sortActiveLayerInfos(this.activeLayerInfos);

         }

       }

     }

    }

Etapas para Reproduzir

ID do Erro: BUG-000127418

Software:

  • ArcGIS API for JavaScript

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