I currently have a web app that I want to create a URL parameter to only turn on one layer when that URL is selected. I found some documentation here but when I add in the "&showLayers=<featurelayerID>", the app opens with all the layers off. Is there something I am doing wrong?
URL I am trying to get working (there's a space between https:// and the rest of the URL as I couldn't display it without it changing to "ArcGIS Online Web Application") is here:
I think it's something with the sublayer in the feature layer I am trying to display found here https://www.arcgis.com/home/item.html?id=60c390dd7f804f05b73177825a485277
Any guidance would be helpful. Thanks!
You have to include the parent layer of the sublayer.
Tip:To make a sublayer visible on the map, all its parent layers must be in the showLayers list.
When the value for the showLayers= or hideLayers= parameter is empty, no layers or all layers will be visible, respectively.
I apologize, I couldn't view the items when I responded, so I was thinking the map service had group layers. Instead of using the itemID of that data, use the layer IDs from the web map you're using in your app.