Before reading this article, please go through the following article.

In this article, you will learn how to use Button Control, TextBlock control, and TextBox Control in Visual C# environment. Also, you will be able to develop a simple arithmetic calculation app in Universal Windows Apps development, using XAML and Visual C#.

The following important tools are required for developing a UWP application,

  1. Windows 10 (Recommended).
  2. Visual Studio 2015 Community Edition (It is a free software available online).

Now, we can discuss the step by step App development.

If you are new to Map control component, I suggest you learn the following article.
In this article we will see about how to set a street view experience
Step 1: Open the already created project called "Mapsample" that is created and deployed in your machine or create a new Universal application by following the above link.
Step 2: Open MainPage.Xaml.cs and add the following code as shown below for creating an Aerial.
Aerial 3D code is given below,
  1. Mapsample.Style = MapStyle.Aerial3D;
Overall code for setting aerial code is,
  1. private async void Mapsample_Loaded(object sender, RoutedEventArgs e)
  2. {
  3. var center =
  4. new Geopoint(new BasicGeoposition()
  5. {
  6. Latitude = 11.66509,
  7. Longitude = 78.154587
  8. });
  9. await Mapsample.TrySetSceneAsync(MapScene.CreateFromLocationAndRadius(center, 3000));
  10. Mapsample.Center =
  11. new Geopoint(new BasicGeoposition()
  12. {
  13. Latitude = 11.66509,
  14. Longitude = 78.154587
  15. });
  16. Mapsample.ZoomLevel = 16;
  17. //check for 3D support
  18. if (Mapsample.Is3DSupported)
  19. {
  20. //set style to 3D
  21. Mapsample.Style = MapStyle.Aerial3D;
  22. //create a mapscene for lat and long
  23. //facing East (90 deg) and pitched 45 deg
  24. var mapScene = MapScene.CreateFromLocationAndRadius(Mapsample.Center, 500, 90, 45);
  25. await Mapsample.TrySetSceneAsync(mapScene);
  26. }
  27. }
Entire code is in Xaml.cs,
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Runtime.InteropServices.WindowsRuntime;
  6. using Windows.Devices.Geolocation;
  7. using Windows.Foundation;
  8. using Windows.Foundation.Collections;
  9. using Windows.UI.Xaml;
  10. using Windows.UI.Xaml.Controls;
  11. using Windows.UI.Xaml.Controls.Maps;
  12. using Windows.UI.Xaml.Controls.Primitives;
  13. using Windows.UI.Xaml.Data;
  14. using Windows.UI.Xaml.Input;
  15. using Windows.UI.Xaml.Media;
  16. using Windows.UI.Xaml.Navigation;
  17. // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
  18. namespace Mapsample
  19. {
  20. /// <summary>
  21. /// An empty page that can be used on its own or navigated to within a Frame.
  22. /// </summary>
  23. public sealed partial class MainPage : Page
  24. {
  25. public MainPage()
  26. {
  27. this.InitializeComponent();
  28. Mapsample.Loaded += Mapsample_Loaded;
  29. }
  30. private async void Mapsample_Loaded(object sender, RoutedEventArgs e)
  31. {
  32. var center =
  33. new Geopoint(new BasicGeoposition()
  34. {
  35. Latitude = 11.66509,
  36. Longitude = 78.154587
  37. });
  38. await Mapsample.TrySetSceneAsync(MapScene.CreateFromLocationAndRadius(center, 3000));
  39. Mapsample.Center =
  40. new Geopoint(new BasicGeoposition()
  41. {
  42. Latitude = 11.66509,
  43. Longitude = 78.154587
  44. });
  45. Mapsample.ZoomLevel = 16;
  46. //check for 3D support
  47. if (Mapsample.Is3DSupported)
  48. {
  49. //set style to 3D
  50. Mapsample.Style = MapStyle.Aerial3D;
  51. //create a mapscene for lat and long
  52. //facing East (90 deg) and pitched 45 deg
  53. var mapScene = MapScene.CreateFromLocationAndRadius(Mapsample.Center, 500, 90, 45);
  54. await Mapsample.TrySetSceneAsync(mapScene);
  55. }
  56. }
  57. }
  58. }
Output