<?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 Mobile Map Package Doesn't Load in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/mobile-map-package-doesn-t-load/m-p/1117761#M10641</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to make an app for IOS and Android using the ArcGIS .net SDK (version 100.12.0) that would show users local trails, descriptions, points of interest, etc.&amp;nbsp; But my mobile map package will not load.&amp;nbsp; I found from an old post somewhere this code that downloads a mobile map package:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        // ItemId is the item's identifier on ArcGIS Online
        private async Task&amp;lt;string&amp;gt; GetData(string itemId)
        {
            // Create the portal
            var portal = await ArcGISPortal.CreateAsync().ConfigureAwait(false);

            // Create the portal item
            var item = await PortalItem.CreateAsync(portal, itemId).ConfigureAwait(false);

            // Create the data folder
            var fileLoc = Path.Combine(GetDataFolder(), "Data");
            if (!Directory.Exists(fileLoc))
            {
                Directory.CreateDirectory(fileLoc);
            }


            // Get the full path to the specific file
            fileLoc = Path.Combine(fileLoc, itemId);

            // Download the file
            using (var s = await item.GetDataAsync().ConfigureAwait(false))
            {
                using (var f = File.Create(fileLoc))
                {
                    await s.CopyToAsync(f).ConfigureAwait(false);
                }
            }

            return fileLoc;
        }&lt;/LI-CODE&gt;&lt;P&gt;Then after I download the map I open the .mmpk file using&amp;nbsp;MobileMapPackage.OpenAsync(filepath) and&amp;nbsp;LoadAsync() methods.&amp;nbsp; I have tested this code with a few different maps and it seems to work for small map sizes but my mmpk file remains blank when you try to load it.&amp;nbsp; Could this be an issue in my code or rather how I packaged the .mmpk file?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Nov 2021 17:10:40 GMT</pubDate>
    <dc:creator>IsaacBevis</dc:creator>
    <dc:date>2021-11-17T17:10:40Z</dc:date>
    <item>
      <title>Mobile Map Package Doesn't Load</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mobile-map-package-doesn-t-load/m-p/1117761#M10641</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to make an app for IOS and Android using the ArcGIS .net SDK (version 100.12.0) that would show users local trails, descriptions, points of interest, etc.&amp;nbsp; But my mobile map package will not load.&amp;nbsp; I found from an old post somewhere this code that downloads a mobile map package:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        // ItemId is the item's identifier on ArcGIS Online
        private async Task&amp;lt;string&amp;gt; GetData(string itemId)
        {
            // Create the portal
            var portal = await ArcGISPortal.CreateAsync().ConfigureAwait(false);

            // Create the portal item
            var item = await PortalItem.CreateAsync(portal, itemId).ConfigureAwait(false);

            // Create the data folder
            var fileLoc = Path.Combine(GetDataFolder(), "Data");
            if (!Directory.Exists(fileLoc))
            {
                Directory.CreateDirectory(fileLoc);
            }


            // Get the full path to the specific file
            fileLoc = Path.Combine(fileLoc, itemId);

            // Download the file
            using (var s = await item.GetDataAsync().ConfigureAwait(false))
            {
                using (var f = File.Create(fileLoc))
                {
                    await s.CopyToAsync(f).ConfigureAwait(false);
                }
            }

            return fileLoc;
        }&lt;/LI-CODE&gt;&lt;P&gt;Then after I download the map I open the .mmpk file using&amp;nbsp;MobileMapPackage.OpenAsync(filepath) and&amp;nbsp;LoadAsync() methods.&amp;nbsp; I have tested this code with a few different maps and it seems to work for small map sizes but my mmpk file remains blank when you try to load it.&amp;nbsp; Could this be an issue in my code or rather how I packaged the .mmpk file?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 17:10:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mobile-map-package-doesn-t-load/m-p/1117761#M10641</guid>
      <dc:creator>IsaacBevis</dc:creator>
      <dc:date>2021-11-17T17:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Mobile Map Package Doesn't Load</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mobile-map-package-doesn-t-load/m-p/1118773#M10657</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp;but my mmpk file remains blank when you try to load it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you explain what you mean by "blank" ? Is the file not downloading, is the mmpk not containing any maps, are the maps that are in it not able to load (and if so what error are you getting?), do the map have layers in it after load, or do it all look fine but you just see blank rendered map on the mapview, do any of the layers fail to load (and if so again with what error)?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 17:30:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mobile-map-package-doesn-t-load/m-p/1118773#M10657</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2021-11-19T17:30:46Z</dc:date>
    </item>
  </channel>
</rss>

