Hi! I am using ArcGIS Desktop 10.4.1 and arcgis Java Api 4.16. I want to make a customised online map application so that when i click on any location it will gives me complete details regarding coordinates of that location and address of nearest point. For this purpose i published a point based address locator but it only gives me the address when i click exactly on that point otherwise it will continuously show me a message that 'no address is found'. My code is attached with this message.
It does seem like locationToAddress() should work but I've never used it. Maybe try a separate call to the ArcGIS REST API.