How can I use the map layer's popup results when clicking on a result in the Query Widget?

560
3
12-12-2019 09:36 AM
AndyWells
Occasional Contributor II

In the Query widget, when you perform a search and are returned a list of search results you can click on a result and normally the map will pan to that location and you will get the popup that is configured in the Query widget. Instead of using that, I would really like to use the popup that is configured in the webmap for the particular layer that I am performing searches on. Is there a way to do that? I have seen some similar questions here, but I can't quite figure out what, if anything, can be edited to allow this behavior.

Thanks!

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Andy,

   As you can see in the attached image the use of the configured popup in the web map for a layer is an option in the widgets settings.

AndyWells
Occasional Contributor II

Robert

I realized that I wasn't clear in the question, and that I may have caused the issue when I made some changes to the Query's widget.js to keep it from showing both the search results pop-up AND the map pop-up if you click on the result on the map. I commented out "resultLayer.setInfoTemplate(popupTemplate);" in Query/Widget.js and it's likely that is exactly the same pop-up that I actually want to see when you click the search result in the query widget. However, even when I un-comment that line, I am only able to get

What I get when I click the search results (with "resultLayer.setInfoTemplate(popupTemplate)" commented out") is this:

What I want it to do is this:

I want to use the map's configured pop-up in the pop-up panel, with an abbreviated set of attributes showing in the search results list. 

Any other tidbits of information you may have, I'd be happy to hear!

Thank you

Andy

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Andy,

   Has to be something you have done in your changes to the query widget then. When I configure the Popup panel and the query widget to show the webmaps popups it work fine.

0 Kudos