Parses ground layer configurations.
Configurations for the ground layer.
A promise which resolves to { instance : groundlayer {.
// well known ground name
configParser.parse("world-elevation").then((result) => {
// result.instance is esri/Ground
});
// array of elevation layers
configParser.parse([{
"url": "http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer",
"type": "AGS_ELEVATION"
}]).then((result) => {
// result.instance is esri/Ground
});
// ground config object, the only way to add additional properties, like "title"
configParser.parse({
title: "My Ground Name",
layers: [{
"url": "http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer",
"type": "AGS_ELEVATION"
}, {
"url": "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Elevation/MtBaldy_Elevation/ImageServer",
"type": "AGS_ELEVATION"
}]
}).then((result) => {
// result.instance is esri/Ground
});
Parses ground configurations into instances of
esri/Ground
.Use service name
"map-config-api.GroundConfigParser"
to inject an instance of this class.