Disable resulting Pop-up after running URL Query Parameter

07-13-2017 04:08 PM
New Contributor III

As the title says, I would like to disable the resulting pop-up after running a Query URL Parameter.....

The pop-up seems to be tied to the selection of the feature that you just queried on, so if you close the pop-up, the selection of the feature is also cleared.

Ideally, what I would like to see is the Query URL Parameter zooms to the expected feature, the feature is highlighted, but the pop-up is not displayed.

Example our our URL Parameter: ApplcationURL/?query=Parcels,PID_NUM,35182.4506 

Tags (2)
0 Kudos
4 Replies
MVP Esteemed Contributor


   The problem will be that the popup is what gives the query the highlight of the result. If you do not have the popup then the map will just zoom to the result. If that is acceptable then the code change you need to make is to the jimu.js MapUrlParamsHandler.js (comment out lines 4-12 as below):

  function showSelections(map, layer, features){
    if(!map.getLayer(layer.layerInfo.id)){//feature layer doesn't exist in map
      var infoTemplate = layer.layerInfo.getInfoTemplate();
      // if(!infoTemplate){
      //   layer.layerInfo.loadInfoTemplate().then(function(it){
      //     setFeaturesInfoTemplate(it);
      //     doShow();
      //   });
      // }else{
      //   setFeaturesInfoTemplate(infoTemplate);
      //   doShow();
      // }
0 Kudos
New Contributor III

Thank you for your response Robert!

I had thought that the alteration might occur in this MapURLParamsHandler.js file based on a similar response of yours here on GeoNet. Unfortunately, we need to have the feature highlight, so I think we will have to go the JavaScript route to come up with a solution. I do greatly appreciate your response, and it is useful information to know that a person can implement the Query URL Parameter, zoom to a feature, and have the pop-up not display.

0 Kudos
New Contributor III


We are trying to accomplish the same thing you are. Did you end up finding a way to highlight the selection without displaying the popup? We are able to disable the popup as Robert had shown above but we would still like to have the selection highlighted.

New Contributor II

I know it's been years since this question was posted, but I had the same question and worked out an answer. The doShow() function has two lines. The first highlights the feature and the second shows the popup. I made another function called doShowNoPopup() that just has that first line, map.infoWindow.setFeatures(features);. Then I call doShowNoPopup() from ShowSelections().