getAllLayersAndTables

Function
import { getAllLayersAndTables } from '@esri/arcgis-rest-feature-layer';
getAllLayersAndTables({
  url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0"
})
  .then(response) // { layers: [...], tables: [...] }

Fetches all the layers and tables associated with a given layer service. Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm

Parameters

Parameter Type Default Notes
options Required IGetLayerOptions

Request options, including the url for the layer service

Returns

A Promise that will resolve with the layers and tables for the given service

Property Type Notes
layers ILayerDefinition[] | ILayerDefinition
tables ILayerDefinition[] | ILayerDefinition

Function defined in packages/arcgis-rest-feature-layer/src/getAllLayersAndTables.ts:25