I have a webmap in ArcGIS Online that contains a single polygon layer. I would like to be able to query the map after a user submits an address and then return a True/False result based on if the address is inside the polygon or not. What would be the minimum javascript code to get started with this? IM just getting started with the ESRI API's and would appreciate any input to get started.
TIA,
Chris
You would need to geocode the address (unless you have an address layer you can search) to get a location; probably with the Search widget. Then use the geometry engine contains() method to test the address location with your polygon.
An address from a form is just a string. You will need to geocode it to determine the actual spatial location (geometry) in order to perform geometry operations with it, like testing if it's located inside a polygon.