Maps and directions (XAML)

Purpose

Windows provides a rich platform for apps that display maps and give directions.

  • Display highly customizable maps in the MapControl.
  • Get locations, addresses, and routes by using the services in the Windows.Services.Maps namespace.
  • Overlay third-party or custom tiles on a map by using tile sources.
  • Download maps for offline use.
  • Display maps and directions in the built-in Maps app by calling the bingmaps: Uri scheme.

In this section

Topic Description

How to authenticate a Maps app

Your app must be authenticated before it can use the MapControl and map services in the Windows.Services.Maps namespace. This topic describes how to authenticate a maps app for Windows Phone 8.1.

How to display maps in the Map control

Display customizable maps in your app by using the Map control.

How to display pushpins, shapes, and controls on a map

Display info about points of interest on a map by adding pushpins, images, shapes, and XAML controls to the map displayed in the MapControl.

How to get locations and addresses

Convert addresses to geographic locations (geocoding) and convert geographic locations to addresses (reverse geocoding) by calling the methods of the MapLocationFinder class in the Windows.Services.Maps namespace.

How to get and display routes and directions

Get driving or walking routes and directions by calling the methods of the MapRouteFinder class in the Windows.Services.Maps namespace. Display a route in a MapControl with a few lines of code.

How to overlay tiled images on a map

Overlay third-party or custom tiled images on the map displayed in the MapControl by using tile sources. Use tile sources to overlay specialized information - for example, weather data, population data, or seismic data - or even to replace the default map entirely.

How to download and update offline maps

Call the methods of the MapManager class to let the user download maps for offline use, or to update offline maps that the user downloaded previously.

How to display maps and directions in the built-in Maps app

Call the bingmaps: Uri scheme from your Windows Phone Store app when you simply want to display a map or directions in the built-in Maps app. The bingmaps: Uri scheme for Windows Phone Store apps provides a rich subset of the functionality of the maps: Uri scheme for Windows Store apps, which launches the built-in Windows Store Maps app on Windows Runtime devices.

How to request driving or walking directions from another app

This topic describes how to write a Windows Phone app that requests driving or walking directions to a specified destination from another app installed on the phone. Your app requests directions by calling the ms-drive-to or ms-walk-to Uri scheme.

How to respond to requests for directions from another app

This topic describes how to write an app that responds to requests for driving or walking directions when called by another app installed on the device. The other app requests directions by calling the ms-drive-to or ms-walk-to Uri scheme.

URI scheme for the Windows Maps app

The Maps app that is included with Windows 10, Windows 8.1, and Windows 8 can be opened by other Windows apps by using the Uniform Resource Identifier (URI) scheme that is described herein. By providing the appropriate parameters to the URI scheme, apps can display a location or route on a map as well as the results of a location or business search.

 

API Reference

Windows.UI.Xaml.Controls.Maps

Windows.Services.Maps