How to launch the Map settings page to download maps in WP8?


You might have used maps in your Windows Phone applications to help the user navigate from one place to another place. Windows Phone 8 supports downloading of maps for a specific place and/or country. If you want your user to easily navigate to download maps page, this post will help you.

 

Windows Phone 8 SDK exposes MapDownloaderTask, which will help you for this easy navigation. Continue reading for more information on this.

 

Recently while working in one of my Windows Phone 8 application named “Place Explorer”, I realized that, it is difficult for the user to go to Settings Page and then search for the Map Downloader application. So, what about providing an option within the app to directly navigate the user to the map downloader page!

 

If you have similar thought for your application, let me tell you that, Windows Phone 8 exposes a sealed class named “MapDownloaderTask” present under “Microsoft.Phone.Tasks” namespace, which allows an application to launch the map settings page and provide an option to download the map data for offline use.

 

To programmatically open the map settings page for offline use, first create an instance of the class “Microsoft.Phone.Tasks.MapDownloaderTask” and then call the Show() method as shown in the below code snippet:

 

var mapDownloaderTask = new MapDownloaderTask();
mapDownloaderTask.Show();

 

Now once you execute the above lines, it will first load all the downloaded maps in your Windows Phone 8 device. If you want to add additional maps, tap the “Add” button in the AppBar to choose available map contents for download as shown below:

 

Loading the list of downloaded maps in Windows Phone 8List of all downloaded maps in Windows Phone 8List of all available maps in Windows Phone 8

 

I hope, this small but useful Windows Phone 8 post will help you to give a better usability to your user in your Windows Phone application to launch the map downloader application for downloading the map content for offline use.

 

Stay connected with me on my blog, Twitter and Facebook/ Subscribe to my blog’s RSS feed and email newsletter to get all the article updates delivered directly to your inbox. Happy Coding.


0 comments


 
© 2008-2014 Kunal-Chowdhury.com | Designed by Kunal Chowdhury
Back to top