this might be an absolute basic question, but how do I add a raster to an active map so that it is listed in the table of content and visible in the map?
I managed to create an empty map, which is then under MapView.Active.Map. when I try to add a simple .tif raster to this map, I fail. I tried various code snippets, but none works for me. the .tif rasterfile is currently in my local directory.
https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Raster I found this code snippet (Open raster dataset in a folder), which works as it doesnot raise an error. But it doesn't add the created raster to the map either. So I'm guessing that I need to add it specifically.
https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic11851.html the docu suggests a RemoveLayer method. but I cannot find a addRaster or addLayer method. how is this done??
https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/AddRasterLayer I also found this example, but I really don't see/get where they are adding the raster..
thanks for any help