Show / Hide Table of Contents

    Mapsui UWP Getting Started

    Step 1

    Create new 'Blank App (Universal Windows)' in Visual Studio

    Step 2

    In the package manager console type:

    PM> Install-Package Mapsui.Uwp -pre
    

    Step 3

    Open MainPage.xaml and add namespace:

    xmlns:uwp="using:Mapsui.UI.Uwp"
    

    Add MapControl to the Grid:

    <Grid>
      <uwp:MapControl x:Name="MyMap" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
    </Grid>
    

    In MainPage.xaml.cs, add namespace:

    using Mapsui.Utilities;
    

    Add code to the constructor:

            public MainPage()
            {
                this.InitializeComponent();
    
                MyMap.Map.Layers.Add(OpenStreetMap.CreateTileLayer());
            }
    

    Step 4

    Run it and you should see a map of the world.

    • Improve this Doc
    Back to top Generated by DocFX