How can I get the search widget to pull in searchable layers from a web map when creating an app using a configurable app template built in Web AppBuilder Developer Edition?

411
3
05-31-2018 09:32 AM
deleted-user-_DaThaNw7l24
New Contributor

I created a configurable app template using Web AppBuilder Developer Edition with these features:

  • Nat Geo basemap
  • No layers
  • Search widget with ESRI World Geocoder search source

I then added the app template to the configurable apps folder in my portal.

Our workflow is that a non-developer will then use my configurable app template to create apps as follows:

  1. They create a web map with their layers of interest
  2. They create an app from that web map, using my configurable app template

Expected behavior:

The app would recognize the layers in the web map and the app would include searchable layers from the web map in the functionality of the search widget.  I need to be able to allow a non-developer to create apps using my app template, and I need the layers they include in their web maps to be searchable through the search widget in my app template.

Actual behavior:

The app doesn't pull in the searchable layers from the web map into the search widget.  Search only uses the default ESRI World Geocoder.

The non-developer can configure the search sources if I expose that configuration to them, however all they can do is replace the ESRI World Geocoder, as that is the only option included in the app template.  This is problematic because they want to be able to use the ESRI World Geocoder in addition to all searchable layers in their web map.

I would love some ideas on how to make this work. Thanks!

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Erin,


  The search widget is not developed to automatically use the searchable layers in the web map. The Search widget has to be configured for each layer that is to be searched. So what you are wanting is not currently possible.

0 Kudos
deleted-user-_DaThaNw7l24
New Contributor

Thanks Robert.

I found that when I build an app in Web AppBuilder, the search widget automatically pulls in any layers from the map that I include in the app (without being configured).  Then when I export the app as a template, and use the template to create an app from another map, the search widget no longer pulls in the additional layers from that new map.

Is that your understanding as well?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Erin,

   Nope. I have never seen the search widget automatically add any web map layer to itself to be search on.