Select to view content in your preferred language

Customized API to location details from Feature service

384
3
Jump to solution
03-28-2025 06:17 AM
vijaybadugu
Frequent Contributor

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

0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

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/

View solution in original post

0 Kudos
3 Replies
by Anonymous User
Not applicable

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.

Noah-Sager
Esri Regular Contributor

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/

0 Kudos
vijaybadugu
Frequent Contributor

Thank you .

0 Kudos