Hi,
I have an application that uses code similar to:
https://developers.arcgis.com/net/latest/uwp/sample-code/raster-layer-file/
The only difference ís that I open a .tif file from the local storage.
In the 100.4 version of Esri SDK the raster layer loads perfectly, but id I upgrade my SDK to 100.5 or 100.6 the application crash in the .LoadAsync();.
There is another way to create a layer with a offline .tif?
Thanks.
Hi,
Can you attach a repro? Or share your code and the raster dataset?
Cheers
Mike
Hi,
Sorry, but I can't share the raster dataset.
The code that I am using is:
// Add an imagery base map
Map myMap = new Map(Basemap.CreateImagery());
// Get the file name
string filepath = caminho.DiretorioExportacaoLog + "/FILES/ortofoto2015.tif";
// Load the raster file
Raster myRasterFile = new Raster(filepath);
// Create the layer
RasterLayer myRasterLayer = new RasterLayer(myRasterFile);
// Add the layer to the map
myMap.OperationalLayers.Add(myRasterLayer);
// Add map to the mapview
MyMapView.Map = myMap;
try {
// Wait for the layer to load
await myRasterLayer.LoadAsync();
// Set the viewpoint
await MyMapView.SetViewpointGeometryAsync(myRasterLayer.FullExtent);
} catch (Exception e)
{
await new MessageDialog(e.ToString(), "Error").ShowAsync();
}
The application just closes with no exception message.
If I use the 100.4 version of the sdk the application works fine.
Thanks for your help.