Numéro d’ID de bogue |
BUG-000097727 |
Envoi | July 13, 2016 |
Dernière modification | June 5, 2024 |
S’applique à | ArcGIS API for JavaScript |
Version trouvée | 3.17 |
Système d’exploitation | N/A |
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
Adding a feature layer to the map in a selection mode. API is doing what it is supposed to do. It is selecting features that intersect where you clicked on the map. That is what selection mode does.
If you wish to edit features that meet only certain criteria than set the definitionExpression on the featureLayer. The editor will only allow users to edit the features that meet the definitionExpression. In the jsBin code I added the following line after where it creates the new feature layer. I confirmed that it works. It will only let you select features that meet definition expression criteria.
Here the code…
Layer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/FeatureServer/0", {
mode: FeatureLayer.MODE_SELECTION,
outFields: ["*"],
opacity: 0.75
});
//added this line below
noPermitFeatureLayer.setDefinitionExpression("apn = '234240014'");
var query = new Query();
query.where = "apn = '234240014'";
noPermitFeatureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW);
Étapes pour reproduire
ID de bogue: BUG-000097727
Logiciel:
- ArcGIS API for JavaScript