AnsweredAssumed Answered

Search Widget Questions

Question asked by peanutman0 on Apr 20, 2015
Latest reply on Apr 27, 2015 by peanutman0

I have two questions regarding the search widget:

 

1) How do you change the graphic style on the result from the new search widget?

 

This thread describes how to set the style of the graphic when toggling the info window for the returned graphic.  I have tried this and it does work when toggling the infoWindow.  I am not clear on how to set the style of the graphic returned before clicking on the graphic to open the infoWindow.  Any ideas?

 

2) When I return polygons using the search widget the map zooms in a little farther than I would like most of the time.  I would like to be a little further out.   How can I correct this?  I have tried setting the map zoom on 'select-result' event handler but it seems that this event handler fires a bit too early and I wind up panned to the wrong location on the map.

 

on(s,'select-result', function(e) {

      map.setZoom(8);

      });

 

Setting the zoomScale in the constructor for the search widget works for my point feature layers but for the polygon feature layers it does not work.  I believe this is because the polygons have a predefined extent.   How can I override this?

 

Thanks for any guidance.

 

Rich

Outcomes