utils

AMD: require(["esri/versionManagement/versionAdapters/utils"], (versionManagementAdapterUtils) => { /* code goes here */ });
ESM: import * as versionManagementAdapterUtils from "@arcgis/core/versionManagement/versionAdapters/utils.js";
Object: esri/versionManagement/versionAdapters/utils
Since: ArcGIS Maps SDK for JavaScript 4.30

Provides utility methods for creating VersionAdapter.

Method Overview

Name Return Type Summary Object

Used to generate an instance of VersionsAdapter.

utils

Used to generate an instances of VersionsAdapter.

utils

Method Details

createVersionAdapter

Method
createVersionAdapter(input){VersionAdapter |null}

Used to generate an instance of VersionsAdapter.

Parameter

Input used to generate VersionAdapter.

Returns
Type Description
VersionAdapter | null
  • Returns an instance of VersionAdapter.
Example
const layer = new FeatureLayer({
    url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/12"
});
const adapter = utils.createVersionAdapter(layer);

createVersionAdapters

Method
createVersionAdapters(input){VersionAdapter[]}

Used to generate an instances of VersionsAdapter.

Parameter

Input used to generate VersionAdapter.

Returns
Type Description
VersionAdapter[]
  • Returns an array of VersionAdapter.
Example
const layer1 = new FeatureLayer({
    url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/12"
});
const layer2 = new FeatureLayer({
    url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/13"
});
const adapters = utils.createVersionAdapters([layer1, layer2]);

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.