漏洞
漏洞 ID 编号 | BUG-000143342 |
---|---|
已提交 | September 30, 2021 |
上次修改时间 | June 5, 2024 |
适用范围 | ArcGIS API for JavaScript |
找到的版本 | 4.21 |
操作系统 | Windows OS |
操作系统版本 | 10.0 |
状态 | Will Not Be Addressed |
To change Graphic.symbol at runtime, do one of the following:
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;
漏洞 ID: BUG-000143342
软件:
获取来自 ArcGIS 专家的帮助
下载 Esri 支持应用程序