Numéro d’ID de bogue |
BUG-000104611 |
Envoi | April 20, 2017 |
Dernière modification | June 5, 2024 |
S’applique à | ArcGIS API for JavaScript |
Version trouvée | 3.20 |
Système d’exploitation | Windows OS |
Version du système d’exploitation | 10.0 64 Bit |
Statut | Will Not Be Addressed
L’équipe de développement a examiné le problème ou la demande et a décidé qu’ils ne seraient pas traités. Pour d’autres explications, reportez-vous à la section Informations supplémentaires correspondant au problème.
|
Informations supplémentaires
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;
});
Solution de contournement
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.
Étapes pour reproduire