I'm looking for a simple way to display the search results, Fall For Greenville.
I know I have to turn off the autoSelect and use the search-complete event but I don't really understand what this means. I can use the below to log it in the console but how do I do anything with it the search-complete?
searchWidget.on("search-complete", function(event){
// The results are stored in the event Object[]
console.log("Results of the search: ", event);
});
Scott
Scott,
What is it that you want to do with the search results?
Just display them and let users select.
When a user types in a search term and you have autoSelect set to true then they are not presented with the results list it just automatically goes to the first result.
I'm looking to set it to false and be presented with the list, similar to what it does for suggestions.
I could potentially use the default template which has "Show More Results" but the results are limited. In the case below, the more results are limited to five but in reality there are more than 40 results that would apply
OK,
Then you will have to loop through the results from the search-complete event handler and use something like dojo domConstruct to build html elements to display to the end user and attach events to those elements for zooming etc. Sorry no easy solution to this.
Yeah that seems way out of my depth and not worth the input. Seems crazy to me that results table would be that hard but then again I don't know what I don't know so...
Any way to expand the "more results" from the default popup?
You can set featureNavigationEnabled on the views popup.