AnsweredAssumed Answered

Replicating a feature click, without clicking

Question asked by alasher on Feb 10, 2015
Latest reply on Feb 10, 2015 by rscheitlin

Gist of the problem:

I've built a convenient search widget that finds features on the map based on specified attributes. The issue I'm having is with replicating a click onto this feature. Right out of the box, if you click on a feature on the map the API will highlight the symbol with a little blue box, and show its InfoWindow, if it has one. I would like to replicate this functionality, but without clicking on it at all.

 

More information:

I've actually manually implemented what I'm asking above already, but it isn't working properly. I do this by generating a point that represents the graphic (say, the center of an extent, or the midpoint on a polyline,) zooming to it, then I manually create a graphic to highlight it along with an infoWindow. My actual problem is the infoWindow I'm creating has all of the attributes showing that I'd like, but coded values work strangely. If you click on the map normally, it will show the coded value description as the value (ex. "Some Waste Company") in the infoWindow. If, however, you run my search and view my manually generated infoWindow, it shows the coded value's code instead (ex. "SWC".) Because of how seemingly complicated it is to implement something that seems so simple, I can't help but wonder if there's an easier way to do it. If there isn't, then my follow up question would of course be "how do I fix these stupid infoWindows?"

 

Thanks a lot, I'll be happy to reply with additional information.

Outcomes