Our team is working on Run Time SDK to develop Mobile application for field survey. We have a requirement of elevation / Z value, we are using ArcGIS online basemaps in ESRI Map View for android.
Is there any way to get the elevation / Z value using map view object. Please suggest.
If you want to get elevation from screen coordinate in 3D using sceneview, you can look into the following sample.
https://github.com/Esri/arcgis-runtime-samples-android/tree/main/java/get-elevation-at-point
However if you looking to get elevation on a 2D MapView. Then you can add an elevation service like below provided one as a RasterLayer and perform mapView.identifyLayerAsync on that layer to get elevation. Note that the elevation service requires an ArcGIS Online organizational subscription or an ArcGIS Developer account
https://elevation.arcgis.com/arcgis/rest/services/WorldElevation/Terrain/ImageServer
RasterLayer rasterLayer = new RasterLayer(new ImageServiceRaster("ServiceURl"));
Thanks
Rama
@RamaChintapalli, thank you for your help.
Out team are trying to get elevation on a 2D MapView also (not via 3D using scene view which works fine but consumes extra RAM and leads to overhead).
But loading of image service raster
val imageServiceRaster = ImageServiceRaster("https://elevation.arcgis.com/arcgis/rest/services/WorldElevation/Terrain/ImageServer")
always fails with the following error:
com.esri.arcgisruntime.ArcGISRuntimeException: Internal error.: Failed to read configuration data
Platform: Android
Version: 100.15.0
Are any suggestions/tips what can be the issue root cause?