@wsdot/arcgis-rest-gp
v0.0.5
Published
Extends ArcGIS REST JS with geoprocessing capability
Maintainers
Readme
Geoprocessing client
For use with ArcGIS REST JS.
Install and use
Run this command to install into your NPM project.
npm install @wsdot/arcgis-rest-gpImporting the module
import { execute } from "@wsdot/arcgis-rest-gp";Example
import { execute } from "@wsdot/arcgis-rest-gp";
(async () => {
const response = await execute({
// URL and params properties will differ depending on your service.
taskUrl:
"https://example.com/ArcGIS/rest/services/MyFolder/MyGP/GPServer/GetBlockNumber",
params: {
ClickPointX: -13680704.57,
ClickPointY: 5947457.27,
PrimaryTrafficway: "17th Ave SE",
BufferDistance: 50,
},
});
const { results, messages } = response;
// Get the values from each result.
const resultValues = results.map((r) => r.value);
})();