AnsweredAssumed Answered

Passing URL parameters to Web AppBuilder to define operational layers

Question asked by lbroyles@blm.gov_BLM_EGIS on Dec 4, 2017
Latest reply on Dec 5, 2017 by kwobbe@blm.gov_BLM_EGIS

I have a need to pass through the same URL parameters to a Web AppBuilder app (Development Edition) as one would expect to use with the default viewers in ArcGIS Online or Portal for ArcGIS. Using the open-sourced Geoportal Server, my team would like to use a Web AppBuilder app to pass through the resulting map service record from the search results. Geoportal does this by building a URL parameter to tag onto an existing map viewer link. 

Currently, all versions of Web AppBuilder only allow to pass through URL parameters like: webmap, center, extent, find, marker and query (SOURCE: Use URL parameters—Web AppBuilder for ArcGIS | ArcGIS ).  In ArcGIS Online and Portal for ArcGIS, both resources have the ability to pass through URL parameter to define operational layers like: webmap, layers, url, or urls (SOURCE: Use URL parameters to modify maps—ArcGIS Online Help | ArcGIS ).


Geoportal build's it's URL parameter to pass through 'url=' trailing a HTML encoded map service URL. This works great when you choose to use the default webmap viewers in AGOL/Portal but we would like to use a custom webapp via Web AppBuilder (Dev Edition) that has some of the other Geoportal widgets included, like Geoportal Search. This would allow us to keep our users at our site, not opening a new webpage like the other viewers.


In my research, it looks like there is only one file in the jimu.js framework that handles passing through URL Parameters in Web AppBuilder: MapUrlParamsManager.js. It would be possible to develop the code to handle the URL parameters I would like but I'm not as savvy with JavaScript as I would need to be to do this.


I tried to use the Share widget to accomplish this but I found another dead-end road there for these types of URL parameters.


Has anyone else had any luck developing what I'm looking for?  A couple of folks at Esri are aware that I have this requirement but I haven't heard if they are developing this or not so I'm resorting to asking the Geonet community.


Thank you in advance for any information you can provide


Use URL parameters—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers