I was trying to create a customized api which internally sends a request to geocode service , pass the point to our own feature service to get other attribute information and return same thing in json format. i was planning to use JavaScript api to manage above functionalities. However, How to provide a API End point to the user and they can consume to get the customized output in json. I would have given directly feature service URL, However, it does only limited functionality. I want to add multiple functionalities in to it like geocoding, pass the point to different feature services to get the linked information
Solved! Go to Solution.
The locator class with have some useful methods:
https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-locator.html
And you might want to check out REST JS for this sort of work:
https://developers.arcgis.com/arcgis-rest-js/
JS Maps SDK is just a front end library. To build APIs with JS, you should probably use a framework that handles back end, like Express, Next.js, etc.
You would set up routing so that whenever user requests a specific URL, your server would run a custom function and return its result to the user. Inside that function you can use whatever library you want, including JS Maps SDK.
The locator class with have some useful methods:
https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-locator.html
And you might want to check out REST JS for this sort of work:
https://developers.arcgis.com/arcgis-rest-js/
Thank you .