I'm developing a routing app using the JS API. One thing I'm looking at trying to implement is having a search box (to find an address) add a stop to create a route.
Currently, I have the search working, it is using our own Geocoding server (not ESRIs) and the Geocoder Widget. It is displaying and zooming to the the location as a point on the map. To perform the routing I am using routeTask. I can input stops by clicking on the map and then solve the route using a button.
What I would like to be able to do is have the user search for an address, the map zoom to the location. They can then click a button to have the point added as a location on the map. I thought I might be able to use returned JSON but the only thing returned in the console is the GET function getting the new tiles for the area I've zoomed too.
If anyone has an idea of how to achieve this, it would be greatly appreciated.