Hi all,
Please as anyone been able to use the instruction here "Use URL parameters" to make visible certain layers with their maps (dev: On-premise server deployment)? kindly guide someone in need.
Baba
If anyone is still interested in turning layers on and off using url parameters and you're using the WAB developer edition, I've modified the url parameter handler module so you can toggle layers and sub layers on and off. I needed this functionality in an app I built and couldn't find a solution anywhere else. I posted about how to use it at https://ryandavison.net/toggle-layer-visibility-using-url-parameters-in-web-app-builder-developer-edition/ . There's a link at the bottom of the post to the updated module on Github.
Actually No, As the only url parameters that are parsed from the url in WAB are those that are supported by the App and not all the one supported by the web map.
Perhaps, but shouldn't modifying the URL for a webmap and a webapp work basically the same? For example, using the /?find= with a wemapp URL and using &find= with a webmap URL both do the same thing.
So if I have a webmap that is used in a webapp, shouldn't I be able to turn a layer visible regardless of whether it is in a map or an app??
Hopefully that makes sense.
B Bulla,
Think your problem is that you are confusing the url abilities of the AGOL Map Viewer (which is what your link is referencing) and the supported url parameters of WAB:
Use URL parameters—Web AppBuilder for ArcGIS | ArcGIS
Hi. I've been working on this based on this ESRI document, which seems to elude to the fact that you can make layers visible using the URL. See 'Set Layer Visibility'. Use URL parameters to modify maps—ArcGIS Online Help | ArcGIS
Of course (as with most ESRI articles), the demonstration link works, but I have not been able to get this to work with one of my own web maps.
Robert,
The reason for the question is that in the share widget, the url (see image) shows a "?visiblelayer=" parameter but only that of the extent worked, so that got me curious
EDIT: As using the embed option look foolish if only the extent parameter works in the WAB Dev edition
Baba,
Nope that is not part of the WAB capabilities.
There isn't, however, you can make certain layers visible using ArcGIS JavaScript API like here, I was think that might be possible when we deploy the app locally
There is nothing in the url parameters that says you can set which layers are visible. What gave you that indication?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.