The visibility of a FeatureLayer cannot be toggled in the MapView when the 'visible' property is initially set to 'false' in ArcGIS API for JavaScript 4.0.
上次发布: July 20, 2016ArcGIS API for JavaScript
漏洞 ID 编号
BUG-000097737
已提交
July 13, 2016
上次修改时间
June 5, 2024
适用范围
ArcGIS API for JavaScript
找到的版本
4.0
操作系统
N/A
操作系统版本
N/A
修正版本
4.1
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
1. In the sample application at https://jsfiddle.net/gkj4hhrv/, change the 'visible' property of the FeatureLayer to 'true' at Line 37.
2. In the HTML section at Line 6, after the 'id' attribute for 'checkbox', add the following attribute: checked="true", and the toggling works as expected.