AnsweredAssumed Answered

Trying to show Infowindow on query callback

Question asked by alex.gole_ELDORADOCOUNTY on Feb 28, 2017
Latest reply on Mar 1, 2017 by alex.gole_ELDORADOCOUNTY

Hi all,

I am having trouble getting the infowindow to show up at the query callback. My goal is to zoom to a point and open infowindow immediately.  Is there a way?

 

function queryCallbackrc(featureSet) {
            arrayUtil.forEach(featureSet.features, function (feature) {
            var graphic = feature;
           map.infoWindow.show(graphic, InfoWindow.ANCHOR_UPPERRIGHT);
           if (graphic.geometry.type === 'point') {
          
           var mz = map.getMaxZoom() ; 
           if (mz > -1) { 
           map.centerAndZoom(graphic.geometry, mz - 2); 
           } else { 
           map.centerAndZoom(graphic.geometry, 0.25); 
           } 
           }         
            else { 
            map.setExtent(graphic.geometry.getExtent()); 
            }
            });
         }

Outcomes