laptop and a wrench

Bogue

Resizing the array of point graphics on the graphics layer does not reflect on the map view while zooming in or out when accessing the graphics.

Dernière publication: January 11, 2022 ArcGIS API for JavaScript
Numéro d’ID de bogue BUG-000143342
EnvoiSeptember 30, 2021
Dernière modificationJune 5, 2024
S’applique àArcGIS API for JavaScript
Version trouvée4.21
Système d’exploitationWindows OS
Version du système d’exploitation10.0
StatutWill Not Be Addressed

Informations supplémentaires

The issue is due to a user error.

Solution de contournement

To change Graphic.symbol at runtime, do one of the following:

  • Clone the symbol and change its properties.
  • Assign a new symbol.

The following code works. There is no need to remove and add graphics from GraphicsLayer to change graphic symbols. Use the layer.graphics.getItemAt() method to get the graphic instead of layer.graphics.items. 

var gp0 = layer.graphics.getItemAt(0);

var gp1 = layer.graphics.getItemAt(1);

var gp2 = layer.graphics.getItemAt(2);

const symbol0 = gp0.symbol.clone();

symbol0.size = 10 * rate;

   

gp0.symbol = symbol0;

gp1.symbol = symbol0;

gp2.symbol = symbol0;

Étapes pour reproduire

ID de bogue: BUG-000143342

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