reverse search point by feature key

308
0
09-20-2019 11:01 AM
LeonPapas
New Contributor

Hi there.


I would really appreciate your thoughts and assistance on the below scenario.

I am currently using the search widget to pick up two places, point A and point B. The search wizard returns the feature

key: "dHA9MCNsb2M9Mjg4OTY1NTcjbG5nPTUwI3BsPTE5OTMyODM5I2xicz0xNDoyMDgyNzM2Mg==" and
name: "Mália, Malia", along with longitude and latitude values. I then make a request to an in-house PHP script that calls the "solve" method to retrieve the distance between the two points. The script makes a few calculations and outputs various route information. At the moment, the php script has 4 URL parameters : longitudeA, latitudeA, longitudeB, latitudeB. I would also like to output the name of point A and point B but i do not wish to use URL parameters as users will be able to change the content on demand. Is there anyway to retrieve the point by the provided key ? In this case i would add two more parameters keyA and keyB to the url.
I found the FindTask example ArcGIS API for JavaScript Sandbox and changed the searchFields to searchFields: ["key"] or searchFields: ["feature.key"] but it does not return any result for the returned keys.
Looking forward to your replies.
Thank you very much
Kind Regards
0 Kudos
0 Replies