<?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 Initializing map from map package in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/initializing-map-from-map-package/m-p/549942#M6732</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the following code to load map from a mobile package:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MobileMapPackage mmpk = await MobileMapPackage.OpenAsync(packagePath);&lt;BR /&gt;Map map = mmpk.Maps[0];&lt;BR /&gt;MainMapView.Map = map;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while (Double.IsNaN(MainMapView.MapScale))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;System.Threading.Thread.Sleep(250);&lt;BR /&gt;scale.Text = Convert.ToInt32(MainMapView.MapScale).ToString("N0");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the map is assigned to the map view, I expect the view to initialize and return a valid MapScale. This does not happen however, the while loop above is never exited. If I comment out the three lines above, the map is loaded in the view as expected, but a valid MapScale is returned only after I pan or zoom the map. Is there a way to access MapScale immediately after the map is loaded?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions are welcome. I am using WPF Runtime 100.1.0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Sep 2017 20:41:38 GMT</pubDate>
    <dc:creator>AlexZlotin1</dc:creator>
    <dc:date>2017-09-28T20:41:38Z</dc:date>
    <item>
      <title>Initializing map from map package</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/initializing-map-from-map-package/m-p/549942#M6732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the following code to load map from a mobile package:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MobileMapPackage mmpk = await MobileMapPackage.OpenAsync(packagePath);&lt;BR /&gt;Map map = mmpk.Maps[0];&lt;BR /&gt;MainMapView.Map = map;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while (Double.IsNaN(MainMapView.MapScale))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;System.Threading.Thread.Sleep(250);&lt;BR /&gt;scale.Text = Convert.ToInt32(MainMapView.MapScale).ToString("N0");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the map is assigned to the map view, I expect the view to initialize and return a valid MapScale. This does not happen however, the while loop above is never exited. If I comment out the three lines above, the map is loaded in the view as expected, but a valid MapScale is returned only after I pan or zoom the map. Is there a way to access MapScale immediately after the map is loaded?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions are welcome. I am using WPF Runtime 100.1.0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 20:41:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/initializing-map-from-map-package/m-p/549942#M6732</guid>
      <dc:creator>AlexZlotin1</dc:creator>
      <dc:date>2017-09-28T20:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Initializing map from map package</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/initializing-map-from-map-package/m-p/549943#M6733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you create the mmpk file? This is what I see when using one created through OfflineMapTask.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/375756_pastedImage_1.png" style="width: 620px; height: 128px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 13:01:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/initializing-map-from-map-package/m-p/549943#M6733</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2017-10-03T13:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Initializing map from map package</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/initializing-map-from-map-package/m-p/549944#M6734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have solved the problem by setting map view initial extent after referencing the map package. Thanks Antti.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 18:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/initializing-map-from-map-package/m-p/549944#M6734</guid>
      <dc:creator>AlexZlotin1</dc:creator>
      <dc:date>2017-10-03T18:36:39Z</dc:date>
    </item>
  </channel>
</rss>

