Dear Robert Scheitlin, GISP -
I suceeded in developing Web AppBuilder (Developer Edition) 2.16 custom widget to add zipped shapefile to 3D scene by adapting code example: Create a FeatureLayer from a shapefile.
The example uses the next code:
var params = {
name: name,
targetSR: view.spatialReference,
maxRecordCount: 1000,
enforceInputFileSizeLimit: true,
enforceOutputJsonSizeLimit: true
};
// generalize features to 10 meters for better performance
params.generalize = true;
params.maxAllowableOffset = 10;
params.reducePrecision = true;
params.numberOfDigitsAfterDecimal = 0;
var myContent = {
filetype: "shapefile",
publishParameters: JSON.stringify(params),
f: "json"
};
request(portalUrl + "/sharing/rest/content/features/generate", {
query: myContent,
body: document.getElementById("uploadForm"),
responseType: "json"
})
I will appreciate explanations for the next few questions: