I am trying to move the ESRI world geocoder to the bottom of my list sources for the search function, I believe the it is the first one in the sources array by default (Esri World Locator), as mentioned by Kelly Hutchins's Blog in this thread,
https://community.esri.com/message/517562#517562
I have added four sources to the search function and I want to change the order so that ESRI world geocoder shows up at the end,
I tried this changing the number in the array,
sources: [4], it did not work
Any help or suggestions will be great!
Thanks
Solved! Go to Solution.
I wasn't successful, either, trying to load the source (commented-out code), but I did just reverse the array to show it's possible:
multiple sources example - world geocoder at the end - JSFiddle
Have a look at the following thread - Disable ESRI World Geocoder from Search Bar
I provided an example of how to remove the Esri World Geocoder - I believe you can just add the Esri world geocoder source at the end of the sources array and it should show-up in that order.
I'll see if I can put-together a jsfiddle...
}); sources.push({ geocoder: new Geocoder("https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Geocode_USA/GeocodeServer"), singleLineFieldName: "Single Line Input", outFields: ["Addr_type"], name: "ESRI World Geocoder", autoComplete: true, maxResults: 6, maxSuggestions: 6, //locator.outSpatialReference = map.spatialReference; //}, placeholder: "Find a place or address", }); //Set the sources above to the search widget s.set("sources", sources); s.startup();
I tried your suggestion, do I have it right?
because it is showing up in the drop down at the end of the list, but is not actually working.
Thanks.
I wasn't successful, either, trying to load the source (commented-out code), but I did just reverse the array to show it's possible:
multiple sources example - world geocoder at the end - JSFiddle
Chris,
Yes, that worked, thanks.