In this article

Maps and location overview

02/08/2017

4 minutes to read

Contributors

In this article

This section explains how you can display maps, use map services, find the location, and set up a geofence in your app. This section also shows you how to launch the Windows Maps app to a specific map, route, or a set of turn-by-turn directions.

Display maps

Display maps with 2D, 3D, or Streetside views in your app by using APIs from the Windows.UI.Xaml.Controls.Maps namespace. You can mark points of interest (POI) on the map by using pushpins, images, shapes, or XAML UI elements. You can also overlay tiled images or replace the map images altogether.

Your app must be authenticated before it can use the MapControl and map services in the Windows.Services.Maps namespace. To authenticate your app, you must specify a maps authentication key. This article describes how to request a maps authentication key from the Bing Maps Developer Center and add it to your app.

Overlay third-party or custom tiled images on a map by using tile sources. Use tile sources to overlay specialized information such as weather data, population data, or seismic data; or use tile sources to replace the default map entirely.

Access map services

Add routes, directions, and geocoding capabilities to your app by using APIs from the Windows.Services.Maps namespace.

Your app must be authenticated before it can use the MapControl and map services in the Windows.Services.Maps namespace. To authenticate your app, you must specify a maps authentication key. This article describes how to request a maps authentication key from the Bing Maps Developer Center and add it to your app.

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.

In the past, your app had to direct users to the Settings app to download offline Maps. Now, you can use classes in the Windows.Services.Maps.OfflineMaps namespace to find downloaded packages in a given area (based on a Geopoint, GeoboundingBox, etc.). You can also check and listen for the downloaded status of map packages as well as start a download without requiring the user to leave your app. You'll find examples of how to do this in both the reference content and the Universal Windows Platform (UWP) map sample.

Get the user's location

Get the user's current location and be notified when the location changes in your app by using APIs from the Windows.Devices.Geolocation namespace. These API members are also frequently used in parameters of the maps APIs. APIs from the Windows.Devices.Geolocation.Geofencing namespace notify your app when the user enters or exits a geofence (a predefined geographical area).

Your app must be authenticated before it can use the MapControl and map services in the Windows.Services.Maps namespace. To authenticate your app, you must specify a maps authentication key. This article describes how to request a maps authentication key from the Bing Maps Developer Center and add it to your app.

Set up a geofence in your app, and learn how to handle notifications in the foreground and background.

Launch the Windows Maps app

Your app can launch the Windows Maps app as shown here to display specific maps and turn-by-turn directions. Rather than provide map functionality directly in your own app, consider using the Windows Maps app to provide that functionality. For more info, see Launch the Windows Maps app.