Can we just use raster file as baselayer in basemap instead of online or offline basemaps(topo, imagery) and still add graphics in graphics overlay of mymapview and do geometry operation on those graphics(GeometryEngine)?
Thanks!
Yes you can. Please have a look into arcgis-runtime-samples-dotnet/src/WPF/ArcGISRuntime.WPF.Samples/Samples/Layers/RasterLayerFile at ma... sample. Instead of creating a basemap from imagery, pass in the raster layer to the map.
Thank you for the information. However, The code still uses imagery basemap which needs online access.
Map myMap = new Map(Basemap.CreateImagery());
Here is the code that uses a local raster layer as a basemap.
Map myMap = new Map();
String filepath = "location_of_raster_file" ;
Raster myRasterFile = new Raster(filepath);
RasterLayer myRasterLayer = new RasterLayer(myRasterFile);
await myRasterLayer.LoadAsync();
myMap.Basemap.BaseLayers.Add(myRasterLayer);
Hope that helps.
Thank you. Does the same should work when using Scene instead of Map?