<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Offline Map in Xamarin Forms (iOS) is blank whereas in UWP it works fine in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-map-in-xamarin-forms-ios-is-blank-whereas/m-p/1009872#M9625</link>
    <description>&lt;P&gt;Not sure I understand this comment:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// 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 &lt;/LI-CODE&gt;&lt;P&gt;Pretty sure in order to load the file it will need to be in you project folder for the application.&amp;nbsp; To create a project folder the following permission is set in info.plist&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;key&amp;gt;UIFileSharingEnabled&amp;lt;/key&amp;gt;
&amp;lt;true/&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;That will create a project folder that can be found looking at the On My iPad tab in the file browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iPad Pro (9.7-inch) 2020-12-15 12-00-12.png" style="width: 270px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/2265i8B7F3FE9FCEE9C5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="iPad Pro (9.7-inch) 2020-12-15 12-00-12.png" alt="iPad Pro (9.7-inch) 2020-12-15 12-00-12.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There will be the project folder and the tpk file can be located there.&amp;nbsp; Below are folders for two applications installed on my iPad.&amp;nbsp; If you have collector you would see a folder for Collector&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iPad Pro (9.7-inch) 2020-12-15 12-01-47.png" style="width: 329px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/2266i49E007093E688AA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="iPad Pro (9.7-inch) 2020-12-15 12-01-47.png" alt="iPad Pro (9.7-inch) 2020-12-15 12-01-47.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 19:10:34 GMT</pubDate>
    <dc:creator>JoeHershman</dc:creator>
    <dc:date>2020-12-15T19:10:34Z</dc:date>
    <item>
      <title>Offline Map in Xamarin Forms (iOS) is blank whereas in UWP it works fine</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-map-in-xamarin-forms-ios-is-blank-whereas/m-p/1009768#M9623</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;I use different code to load the map based on the Device OS platform&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// 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)); &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following is the result in UWP:&lt;/P&gt;&lt;P&gt;&lt;A title="UWP" href="https://drive.google.com/file/d/1yw2jEgVYVkJfpCyO9_lekYjqQSKtpios/view?usp=sharing" target="_blank" rel="noopener"&gt;Working sample in UWP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following is the result in iOS:&lt;/P&gt;&lt;P&gt;&lt;A title="iOS" href="https://drive.google.com/file/d/10n3E0VyoPgZTOQ5nWNn4pAIWScZfL1vV/view?usp=sharing" target="_blank" rel="noopener"&gt;Sample in iOS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me with this?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 16:06:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/offline-map-in-xamarin-forms-ios-is-blank-whereas/m-p/1009768#M9623</guid>
      <dc:creator>KrishnaShinde</dc:creator>
      <dc:date>2020-12-15T16:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Offline Map in Xamarin Forms (iOS) is blank whereas in UWP it works fine</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-map-in-xamarin-forms-ios-is-blank-whereas/m-p/1009823#M9624</link>
      <description>&lt;P&gt;Try loading the layer explicitly and see if an error is thrown (and what that error is):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;try {
  await tileLayer.LoadAsync();
}
catch(System.Exception ex) {
  // Inspect ex here
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm guessing the issue is your app might not be able to directly read from the path you're specifying.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 18:03:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/offline-map-in-xamarin-forms-ios-is-blank-whereas/m-p/1009823#M9624</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-12-15T18:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Offline Map in Xamarin Forms (iOS) is blank whereas in UWP it works fine</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-map-in-xamarin-forms-ios-is-blank-whereas/m-p/1009872#M9625</link>
      <description>&lt;P&gt;Not sure I understand this comment:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// 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 &lt;/LI-CODE&gt;&lt;P&gt;Pretty sure in order to load the file it will need to be in you project folder for the application.&amp;nbsp; To create a project folder the following permission is set in info.plist&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;key&amp;gt;UIFileSharingEnabled&amp;lt;/key&amp;gt;
&amp;lt;true/&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;That will create a project folder that can be found looking at the On My iPad tab in the file browser&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iPad Pro (9.7-inch) 2020-12-15 12-00-12.png" style="width: 270px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/2265i8B7F3FE9FCEE9C5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="iPad Pro (9.7-inch) 2020-12-15 12-00-12.png" alt="iPad Pro (9.7-inch) 2020-12-15 12-00-12.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There will be the project folder and the tpk file can be located there.&amp;nbsp; Below are folders for two applications installed on my iPad.&amp;nbsp; If you have collector you would see a folder for Collector&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iPad Pro (9.7-inch) 2020-12-15 12-01-47.png" style="width: 329px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/2266i49E007093E688AA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="iPad Pro (9.7-inch) 2020-12-15 12-01-47.png" alt="iPad Pro (9.7-inch) 2020-12-15 12-01-47.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 19:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/offline-map-in-xamarin-forms-ios-is-blank-whereas/m-p/1009872#M9625</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2020-12-15T19:10:34Z</dc:date>
    </item>
  </channel>
</rss>

