Can i show the Raster file(fetching from device) without map and will i read spatial data of that file without map?

259
0
04-17-2019 03:47 AM
dineshsharma
New Contributor

Currently i m showing the raster file with map but i do not want to show the map i just want to show the raster file which is .tif file fetching from my device.

Here is my code

val rasterPath = Environment.getExternalStorageDirectory().path + "/Download/ara_drone_collect.tif"
val raster = Raster(rasterPath)
Log.d("RasterActivity", "file : $rasterPath")

val rasterLayer = RasterLayer(raster)

rasterLayer.addDoneLoadingListener {
    mapView!!.setViewpointGeometryAsync(rasterLayer.fullExtent)
}
val map = ArcGISMap(Basemap.createImagery())


// add the map to a map view@
mapView!!.map = map
// add the raster as an operational layer
map.operationalLayers.add(rasterLayer)
0 Kudos
0 Replies