The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

Windows Phone 8.1 apps - Map Control error RRS feed

  • Question

  • Whenever i  add a map control to my app , it launches in the emulator and then crashes

    But when i removed the map control it works fine

    What could be the problem?


       <Maps:MapControl Width="475" Height="640> </Maps:MapControl>

    Thursday, May 29, 2014 4:29 PM

All replies

  • Have you added the proper capabilities in the WMAppmanifest file?

    Per MSDN Documentation

    "You must add an ID_Cap_Map capability before you add the Map control."

    MSDN Reference Adding a Map Control

    Thursday, May 29, 2014 5:41 PM
  • Thats only for Windows Phone 8.0. I am using Windows Phone 8.1.
    Thursday, May 29, 2014 6:18 PM
  • It clearly says

    "Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1only"

    Thursday, May 29, 2014 6:58 PM
  • Never the less. There is not place in the manifest for placing that capability (I can only check boxes. not write my own capabilities.). Only Windows Phone 8.0 has that option. 
    Thursday, May 29, 2014 7:02 PM
  • The MapControl class is a WinRT control and not a Silverlight one, thus the reason why there is not option in the manifest for this. It should work on without having to turn on any settings. Looking at your code you are missing a quote but I'm going to assume that is a typo. Make sure you have a reference to the proper namespace like this:


    and then add the map like this:

    <m:MapControl Name="MyMap"/>

    I've noticed that the WP8.1 emulator crashes fairly often. For me it crashes after I leave it for about 5 minutes then go back to it. However I don't believe this is due to the maps.

    Wednesday, June 25, 2014 12:42 PM