I'm starting a new thread about this issue since my last thread contained several different questions.
The problem is that the search result graphic sometimes shows up and sometimes it don't (using the searchbox in headercontrollerwidget). When using keyboard arrows and pressing enter for one searchresult in the result list the graphic appear, and if I'm typing a searchterm that only gets one result the graphic appear as well. But when clicking with the mouse on a result in the result list, the info window shows and the map zoom in to the result but no graphic appear.
And according to the other thread I mentioned earlier I'm not alone experience this behavior.
I did some debugging and it seems like when using the mouse and clicking one search result, at first the code runs as expected but then the resultList_changeHandler function is triggered again causing the showSearchResultOnMap function to run again with no searchResult object. So the result graphic is removed and no new graphic is added since the searchResult is null this second time the function is triggered.
I haven't been able to figure out why this happens and how to prevent it yet. Any ideas?
The problem is that the search result graphic sometimes shows up and sometimes it don't (using the searchbox in headercontrollerwidget). When using keyboard arrows and pressing enter for one searchresult in the result list the graphic appear, and if I'm typing a searchterm that only gets one result the graphic appear as well. But when clicking with the mouse on a result in the result list, the info window shows and the map zoom in to the result but no graphic appear.
And according to the other thread I mentioned earlier I'm not alone experience this behavior.
I did some debugging and it seems like when using the mouse and clicking one search result, at first the code runs as expected but then the resultList_changeHandler function is triggered again causing the showSearchResultOnMap function to run again with no searchResult object. So the result graphic is removed and no new graphic is added since the searchResult is null this second time the function is triggered.
I haven't been able to figure out why this happens and how to prevent it yet. Any ideas?