arcgis-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-15 • Public • Published

ArcGIS-Client

JavaScript client for connecting and receiving data from ArcGIS servers

Usage

Install the package into your application

npm install --save arcgis-client

FeatureService

import { FeatureService } from 'arcgis-client'

async function main() {
  // Load the service
  const featureService = await FeatureService.load('https://gis2.lawrenceks.org/arcgis/rest/services/PublicWorks/StormSewer/FeatureServer')

  // Go through each layer
  await Promise.all(featureService.layers.map(async layer => {
    // Get all object IDs
    const objectIds = await service.getObjectIds(layer)

    // Get features (results can differ based on provided options object)
    const features = await service.getFeatures(layer, /*options*/)

    // Get vector file with bounding box
    const vector = await service.getVector(layer, [-1, -1, 1, 1])
  }))
}

Package Sidebar

Install

npm i arcgis-client

Weekly Downloads

1

Version

1.0.0-15

License

MIT

Unpacked Size

71.4 kB

Total Files

71

Last publish

Collaborators

  • matthewdownsnr