Select to view content in your preferred language

Which type of layer should I use for DEM hosted as a map service on ArcGIS Enterprise?

717
3
Jump to solution
12-11-2023 05:54 PM
GIS_Enjoyer
Occasional Contributor

Hello developers,

I am able to use TileLayer for my cached map service and MapImageLayer for my dynamic map service no problem for both mapView and sceneView.

But for DEM, which layer should I use for mapView and which for sceneView?

 

Btw, in ArcPro, the DEM is made from a geotif file and is displayed black and white for its height values.

 

Any tips/suggestions would be appreciated!

0 Kudos
1 Solution

Accepted Solutions
Sage_Wall
Esri Contributor
0 Kudos
3 Replies
Sage_Wall
Esri Contributor

Hi @GIS_Enjoyer thanks for posting your question.  You'll likely want to publish the DEM as an Image Service and use an ImageryLayer for both views.

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html

https://enterprise.arcgis.com/en/server/latest/publish-services/windows/publish-elevation-service.ht...

 

0 Kudos
GIS_Enjoyer
Occasional Contributor

Hello @Sage_Wall . Thank you for your reply!

I have a question though: I think Image Service is used for both views, but ImageLayer is flat so it works only for 2D (and 3D if you don't need elevation). However, if you need elevation, then you would use the same Image Service url but with ElevationLayer?

0 Kudos
Sage_Wall
Esri Contributor

Yeah that's correct @GIS_Enjoyer , same service but two different layer types.  Use the ImageLayer in 2D and the ElevationLayer in the map's ground property in 3D. Sorry for the confusing answer.

let elevLyr = new ElevationLayer({
  // Custom elevation service
  url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Elevation/MtBaldy_Elevation/ImageServer"
});
// Add elevation layer to the map's ground.
map.ground.layers.add(elevLyr);
0 Kudos