I am using ArcPy 10.8, a standalone ArcGIS Server 10.8.1, and ArcGIS JS (with map and scene view ...).
In JS, I am trying to add an ElevationLayer to map using an Image Service like this: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html
By creating an .sd file from my ArcPy script that reads in DEM files and add them to a mosaic dataset.
Currently the .sd file is successfully created and Image Service is published to my ArcGIS Server. However it shows nothing when I go to the server manager and click on this service and try to look at it in ArcGIS Online Map Viewer.
I created this service from a single DEM .tif file (TDF_N49E120_01_DEM.tif). To test this service again I added both to Ground in Elevation Surfaces in ArcGIS Pro (shown in the 2 screenshots). By enabling the tif file and disabling the service, the elevation is shown correctly as a rectangular block. But enabling the service and disabling the tif file makes the ground in that region turn into a rectangular hole.
From some research, I think this problem is with my ArcPy script and that it only specified the horizontal coordinate system (WGS84) but not the vertical one:
# Create a mosaic dataset from a folder of images
try:
print('Creating gdb\n')
arcpy.CreateFileGDB_management(workspacePath, GDBName)
print('Creating a new empty mosic dataset in geodatabase')
arcpy.CreateMosaicDataset_management(GDBPath, Name, SrsLookup['WGS84'], 1, "32_BIT_FLOAT")
print('Adding images to mosaic dataset')
arcpy.AddRastersToMosaicDataset_management(MosaicDatasetPath, "Raster Dataset", inputFolderPath)
print('Messages after attempting to create the mosaic dataset:')
print(arcpy.GetMessages() + "\n")
except:
sys.exit("Failed in authoring a mosaic dataset\n")