Initial Need: The user selects a point in the map and that defines the address in the form
I am looking for a solution that provides a certain level of interaction between a traditional web form and leveraging the ESRI JS api. What I am trying to do is proof a concept where a user can leverage the Find Address example below:
Search for an address | ArcGIS for Developers
I created this JS fiddle with some modifications to the example above
https://jsfiddle.net/Jaykapalczynski/6e0snvyr/3/
Edit fiddle - JSFiddle - Code Playground
In this example the user can click on the map.
This will geocode the Map Location and return an address and XY to variables
I can then use these variables to populate a couple textareas and most importantly to populate a Form on the page.
This works great.
ALTHOUGH - If I use the Find Address input box from the search widget I can enter and address and get the result in a popup. While this appears to solve my needs, I need to capture that Address and XY being returned to the popup (I am assuming the XY location is available some how.) I do NOT want the user to have to interact with the map...ONLY the Find Address input box. I cant seem to find a way to grab the results from the geocoding that are sent back via the Find Address or Place geocoder
Questions:
1. What I am having an issue with is .... capturing the result from the Find Address or Place search and th resulting popup that appears after the search is done (NOT a map click)....and writing those values (address, X, Y) to variables that I can split and push to the forms input boxes.
2. Is there a way to JUST display the "Find Address or Place" input box and get rid of the map and zoom tools? Or do I have to create a new widget? I dont care about the map and zoom tools.
If I have to create my own GP Service and handle the communication back and forth I will do so...but just thought this might be easier.