laptop and a wrench

Erro

FeatureLayer fails to draw when modifying a query via esriRequest.setRequestPreCallback.

Última Publicação: October 15, 2019 ArcGIS API for JavaScript
Número de ID do Erro BUG-000104611
EnviadoApril 20, 2017
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS API for JavaScript
Versão encontrada3.20
Sistema OperacionalWindows OS
Versão do Sistema Operacional10.0 64 Bit
StatusWill Not Be Addressed

Informações Adicionais

The problem is that setPreRequestCallback does not just intercept the query request, it intercepts other requests and not all of those requests have a where property on the content. Some checks need to be added to the setPreRequestCallback function to ensure a query task request. To test this in the sample app (http://jsbin.com/zisoqib/3/edit?js,output) just surround the var y with an if statement as follows. esriRequest.setRequestPreCallback(function (ioArgs) { var x = ioArgs.url.endsWith("query"); if(ioArgs.content && ioArgs.content.where){ var y = ioArgs.content.where.startsWith("xxx"); } return ioArgs; });

Solução Provisória

Setting a definitionExpression on the layer causes the layer to render in the map. See this in the sample provided at http://jsbin.com/zisoqib/3/edit?js,output. Uncommenting both the definitionExpression within the properties of the layer and the line with the ioArgs.content.where, the layer renders in the map without issues.

Etapas para Reproduzir

ID do Erro: BUG-000104611

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