laptop and a wrench

漏洞

When an empty array is passed to the ArcGISDynamicMapServiceLayer.setVisibleLayers() function, it throws exception "404 Invalid layer ID specified".

上次发布: August 25, 2014 ArcGIS API for JavaScript
漏洞 ID 编号 NIM065413
已提交February 19, 2011
上次修改时间June 5, 2024
适用范围ArcGIS API for JavaScript
找到的版本2.1
编程语言JavaScript
操作系统Windows OS
操作系统版本2003
修正版本2.0
状态Fixed

附加信息

Updated the documentation for the 2.2 release to explain how to set no layers visible.

解决办法

To set no visible layers, set the array that is passed into setVisibleLayers equal to -1. This works for both 9.x and 10 if(visible.length === 0){ visible.push(-1); } layer.setVisibleLayers(visible);

重现步骤

漏洞 ID: NIM065413

软件:

  • ArcGIS API for JavaScript

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项