laptop and a wrench

Bogue

Features always return centroids on a query even though the returnCentroid property in a Query Class is set to false.

Dernière publication: October 16, 2019 ArcGIS API for JavaScript
Numéro d’ID de bogue BUG-000124894
EnvoiAugust 29, 2019
Dernière modificationJune 5, 2024
S’applique àArcGIS API for JavaScript
Version trouvée4.12
Système d’exploitationWindows OS
Version du système d’exploitation10.0
StatutWill Not Be Addressed

Informations supplémentaires

This is by design. The document is correct for Query.returnGeometry. It is set to false by default. The createQuery() method sets it to true, please refer to https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createQuery The returnCentroid parameter works as expected. When set to false, the query to the server does not request it and it does not come back from the server. When it is set to true it does come back in the payload. All extent geometries have a centroid, so when an extent is created, the centroid is created along with it. It is not really related to the query. However, where the API for the query is confusing is that returnCentroid is currently not very useful to the end user. The payload is returned, the FeatureSet in JavaScript is not displayed.

Étapes pour reproduire

ID de bogue: BUG-000124894

Logiciel:

  • ArcGIS API for JavaScript

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement