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 Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動