We have a mapservice containing polygons that represents areas that will be flooded (under water) given a specific flood event. If I add this layer to a sceneview, the areas/polygons are clamped to the underlying elevationlayer, meaning that they follow the underlying terrain. What I would really like to do is to have the flooded areas display in 3d, meaning that the areas are not clamped to the underlying terrain, but instead shown as flat surfaces that extrude from the underlying terrain, like they would in real life. If I managed to do this, I could for example combine the flood areas with 3d buildings, and show how the flood would affect the buildings.
I've looked at the different 3d symbols in the arcgis js api, but I can't see how I can manage to accomplish what I want. Does anyone know if this is possible by clever use of 3d symbols? The only alternative I can think about is to make an elevation layer based on the flooded areas, add that to the map and then the mapservice on top of that. Perhaps this is the best approach but I'm not in control of the data or the arcgis server so really not that easy in my context.
When adding MapServices to Scene Viewer by pointing to the service's endpoint e.g. using https://your-arcgis-server/arcgis/rest/myFloodAreas/MapServer they are always draped to the terrain (+ basemap) because handled as `MapImageLayer` (MapImageLayer) on the client (e.g. Scene Viewer).
Did you ever try to add your data as FeatureLayer to Scene Viewer? In your case, as using MapServices you can just load a single layer of your MapService by pointing to its id added directly to the layer's URL. For the example above this would be https://your-arcgis-server/arcgis/rest/myFloodAreas/MapServer/0.
Once you added your data as `FeatureLayer`(FeatureLayer ) to your web scene, Scene Viewer (and JS API) offers you many ways to display your data using 3D symbology.
So the simplest and most effective way to accomplish what you describe above is:
Hi Gianluca, and many thanks for the detailed reply!!
As you suggested, I tried to add my layer as a featurelayer to my scene, and experimenting with different 3d symbols. However, I cannot get the result that I am trying to achieve. I've tried with the 3d water symbol, and the polygon extrude symbol. If I use the 3d water symbol, the polygon is again draped on top of the underlying terrain model (i.e. the resulting polygon is not a flat surface). If I use the extrude symbol, the resulting polygon has varying height for each vertex, again because of the underlying terrain model.
My conclusion so far is that I cannot achieve what I want simply using 3d symbols. What I want to achieve is to give the polygons a certain Z value, and I see now that I can do that using the elevationinfo options of Featurelayer, or by generating a terrain model on-the-fly and place that below the featurelayer.
Anyway, thanks for your help and merry christmas =)