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
createVersionAdapter(input){VersionAdapter |null}
-
Used to generate an instance of VersionsAdapter.
ParameterInput used to generate VersionAdapter.
ReturnsType Description VersionAdapter | null - Returns an instance of VersionAdapter.
Exampleconst layer = new FeatureLayer({ url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/12" }); const adapter = utils.createVersionAdapter(layer);
-
createVersionAdapters
createVersionAdapters(input){VersionAdapter[]}
-
Used to generate an instances of VersionsAdapter.
ParameterInput used to generate VersionAdapter.
ReturnsType Description VersionAdapter[] - Returns an array of VersionAdapter.
Exampleconst 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]);