@wsdot/arcgis-rest-gp
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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-gp

Importing 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);
})();

Package Sidebar

Install

npm i @wsdot/arcgis-rest-gp

Weekly Downloads

0

Version

0.0.5

License

Unlicense

Unpacked Size

12.1 kB

Total Files

12

Last publish

Collaborators

  • jeff-jacobson