Location and Maps in Windows Apps

Developers who build Windows apps can utilize the capabilities of the Windows device to integrate the location and maps in their apps. In this chapter, you will look at recipes on how to use the location API in Universal Windows Runtime apps.

12.1 Get the Current Location


You don’t know where you are. The Windows app needs to determine and display your current location.


Use the getGeopositionAsync method of the Geolocator class defined in the Windows.Devices.Geolocation namespace to get the current location from the devices powered by Windows 10.

How It Works

  1. Create a new Universal ...

Get Windows 10 Development Recipes: A Problem-Solution Approach in HTML and JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.