arcgis-client
v1.0.0-15
Published
JavaScript client for connecting and receiving data from ArcGIS servers
Downloads
122
Maintainers
Readme
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])
}))
}