I am running a Xamarin Forms application supporting both UWP and iOS. We have a TPK file on the device to be used in offline mode. And it works perfectly fine in UWP. I can see the map, interact with it. But in iOS, I get a blank map. The map initialization code is the same for both platforms.
I use different code to load the map based on the Device OS platform
// Using following code to load map on iPad. The tpk file is stored in Files app on iPad and we are allowing user to select the tpk file
var result = await FilePicker.PickAsync();
var mapPath = result.FullPath;
var tileCache = new TileCache(mapPackagePath); ArcGISTiledLayer tileLayer = new ArcGISTiledLayer(tileCache);
Map = new Map(new Basemap(tileLayer));
// Using following code to load on Windows (UWP). On Windows, we are just providing the path where tpk file is located and it works fine.
var mapPackageFolder = @"C:\Temp\Map Files";
var mapPackageFile = @"Topo.tpk";
var mapPackagePath = System.IO.Path.Combine(mapPackageFolder,mapPackageFile); var tileCache = new TileCache(mapPackagePath);
ArcGISTiledLayer tileLayer = new ArcGISTiledLayer(tileCache);
Map = new Map(new Basemap(tileLayer));
Following is the result in UWP:
Working sample in UWP
Following is the result in iOS:
Sample in iOS
Can someone help me with this?
Thanks in advance.