laptop and a wrench

Bug

Layer visibility of map service layers in web maps is not honored in ArcGIS API for JavaScript 4.x.

Last Published: March 30, 2020 ArcGIS API for JavaScript
Bug ID Number BUG-000121406
SubmittedApril 2, 2019
Last ModifiedJuly 20, 2025
Applies toArcGIS API for JavaScript
Version found4.11
Operating SystemWindows OS
Operating System VersionN/A
Version Fixed4.15
StatusFixed

Workaround

Modify a layer in the web map by changing the transparency (and then changing it back to 100%) which adds the layers attribute to the WebMap JSON and forces the JavaScript WebMap class to respect the visibleLayers attribute.

For example, see the following WebMap JSON by replacing the ID in: https://www.arcgis.com/sharing/content/items/6a98eb44a463454eb17d3ed2b312bcc8/data?f=pjson

Steps to Reproduce

Bug ID: BUG-000121406

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options