Thank you Thomas, that would be great. I was now able to get the necessary points from my underlying ElevationService to construct a side polygon this way:
var url = "http://ripsraster.lubw.bwl.de/arcgis/rest/services/Imageservices/
DGM025_cache_3D/ImageServer/getSamples";
var options = {
query: {
geometry: '{"paths" : [ [ [3450000, 5400000], [3455000, 5400000] ] ],
"spatialReference" : {"wkid" : 31463}}',
geometryType: 'esriGeometryPolyline',
returnFirstValueOnly: false,
sampleDistance: stepSize,
f: 'pjson'
},
responseType: 'json'
};
esriRequest(url, options).then(function(response){
var polygonPointArray = [];
for (var i = 0; i < response.data.samples.length; i++) {
polygonPointArray.push(
[xmin + (i * stepSize),
ymin,
parseFloat(response.data.samples.value)]);
}
polygonPointArray.push([xmax, ymin, 0]);
polygonPointArray.push([xmin, ymin, 0]);
polygonPointArray.push([xmin, ymin, parseFloat(response.data.samples[0].value)]);
// This constuctor with sr is necessary due to special coordinate system
var polygon = new Polygon({
rings: polygonPointArray,
spatialReference: {
wkid: 31463
}
});
var fs = new SimpleFillSymbol({
color: [227, 139, 79, 0.8],
outline: {
color: [255, 255, 255],
width: 1
}
});
var polygonGraphic = new Graphic({
geometry: polygon,
symbol: fs
});
graphicsLayer.add(polygonGraphic);
});
But it ends with a strange symbol behaviour, outline is drown but fill is missing!
maybe related to local scene? I've no clue.