Passing URL parameters to Web AppBuilder to define operational layers

3187
1
12-04-2017 12:40 PM
LucasBroyles2
New Contributor

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 

1 Reply
KristenWobbe1
Occasional Contributor

To add a little more background and clarification to this issue, and help describe what our agency is trying to do...

Background:

We have a Geoportal Server instance v1.2.9 with many map services that the GeoportalSearch Widget and the Add-to-Map Widget could leverage if we could get them set-up and configured.  The GeoportalSearch Widget operates through search and discovery of content in the catalog registry, identifying and leveraging the content-type "Live maps and services". When a specific map service is discovered it can be added to a web map (configured viewer), and additional services can be added in the same way for mash-up and visual display.  

In earlier versions of Geoportal Server the GeoportalSearch and Add-to-Map Widgets were delivered out-of-the-box with an easily configurable FLEX Viewer.  As technology has evolved away from FLEX, a replacement solution for a viewer was needed that the widgets could be added to.

     - Currently, the ArcGIS Viewer (associated with AGOL or Portal) can be configured to launch from the "Add to Map" Search Result link (found in the Geoportal), and when the "Add to Map" search result link is clicked on, it is designed to launch the Viewer and drop the service into the web map of the Viewer for display of the service.

     - The GeoportalSearch Widget, allows for the  increased functionality of dropping additional services into the Viewer by enabling the user to discover another service, and to keep adding as many service as desired to mash-up in one web map within the ArcGIS Viewer.  

     - Then the exciting thing is, that there is a new widget out now, "CreateWebMap" that will allow for the user to add the web map they just mashed-up, with the desired services, to AGOL and save it.  That would be a great feature if a Fed-agency like ours could make it work with our current security requirements and SAML authentication.

Desired Solution:

ESRI has made the GeoportalSearch and Add-to-Map widgets available through the developers version of Web AppBuilder (DWAB).  In our agency's world that means that we have to configure a custom viewer with the widgets, and serve them out from our own server, rather than have the viewer in the ESRI cloud (i.e. the ArcGIS Viewer).

What would have been a preferred route, is for ESRI to have added the widgets to the out-of-the-box WAB offerings of widgets, so a user could add them to an AGOL web map Viewer and keep the Viewer and widgets in the cloud, in the same manner we have already configured our Geoportal Server instance to point to the ArcGIS Online Viewer in the cloud.

I understand there are some new options coming in Portal 10.5.1, one of those situations where new capabilities are coming out in Portal before AGOL.  In Portal 10.5.1 we might be successful in "registering" the GeoportalSearch Widget and the  Add-to-Map Widget, then access them through the out-of-the-box Portal/AGOL Web AppBuilder, where they would show up on the new [Custom] tab (which shows up next to the WAB tab).  In this manner, we might be successful in adding the desired widgets to a Viewer in the AGOL cloud, connected to our local Geoportal Server instance.

Lastly, this won't entirely solve our issue, because the Viewer in Geoportal Server must also be configured to work with the Geoportal "Add to Map" Search Results Link, which simultaneously launches the Viewer and adds the discovered map service to the Viewer.  Then once you are in the Viewer the GeoportalSearch and Add-to-Map widgets can work together to allow mash-up of multiple services into a web map for visual analysis, or to potentially be saved as a new web map on AGOL using the new CreateWebMap widget.

In Summary, ESRI made this so much easier in earlier versions of Geoportal Server when they delivered these "ESRI built" widgets out-of-the-box with the FLEX viewer.  Has anyone successfully deployed the GeoportalSearch and Add-to-Map Widgets successfully since then?  If not, has ESRI considered configuring an AGOL Viewer with the desired widgets (i.e. GeoportalSearch, Add-to-Map, CreateWebMap) that could be leveraged broadly by Geoportal Server users?

0 Kudos