Select to view content in your preferred language

need example code of nodeJS project querying enterprise hosted feature layer service, using ArcGIS REST API

623
3
05-26-2022 02:01 AM
MichaelLev
Regular Contributor

I need to develop web service in our enterprise server,
which will be addressed by its url endpoint, with x,y query parameters,
and it will query a hosted feature layer service to get some table attributes
of the polygon that intersects the x,y point.

I need some basic code example
of a nodeJS project
querying an enterprise hosted feature layer service, using ArcGIS REST API

0 Kudos
3 Replies
BlakeTerhune
MVP Regular Contributor

Esri has quite a few sample apps showcasing various parts of the ArcGIS API for Javascript. You don't need NodeJS natively so none of the samples use it. You might be interested in Basic Querying in FeatureLayer.  You'll want to use the "intersects" spatialRelationship property when you query. Here's an example of getting URL parameters to query a feature layer.

AndyGup
Esri Regular Contributor
MichaelLev
Regular Contributor

Thanks, @BlakeTerhune and especially @AndyGup for referring my question.

Indeed I am using nodeJS for developing the non-interactive web service (I prefer it upon Python)
and queryFeatures example was enlighting since this is the way I go.

REQUEST: I need also do "fetchImage" upon MapImageLayer and it will help me bery much to know what is the specific ArcGIS Rest API that I need for this. Does someone know?

2nd REQUEST: Is there some short example of whole little node program addressing the enterprise portal server?

0 Kudos