How To - Azure Maps 101 - Learn how to Azure Maps + .NET Core

Getting started with Azure Maps

In this article, I am trying to get you started with Azure Maps. How to get it set up and create the necessary resources and make changes to the Maps etc.

In my current job, we work with millions of customers who we help set up their equipment. We have a Mobile application for the field technicians and a web front application for all the other people to monitor the progress and make future planning.

Since the physical location of our customers plays a major role in planning and send out technicians for better productivity, Maps are the best bet for us. That got me started into Maps and specifically Azure Maps.

I am a .NET developer and my sample will be in  
.NET Core, Web App with MVC
and I am using VS for MAC  

Azure Maps 101

1. Create your .NET Project (on VS for MAC)

Open VS of MAC, and

  1. Select App from the Web and Console
  2. Selected "Web Application (Model-View-Controller)"
  3. Click "Next"

    New Project 1

  4. I picked "No Authentication" and clicked "Next"

    New Project 2

  5. Give it a name and click Create

    new project

  6. Now within a couple of seconds, the App is created and do a build on the project, you might see the following window, click "Run"

    Build 1

    Build 2

    Click on Install and Trust. Now you will the basic staring page open. Now as we have the app up and running, now let's get to Azure and create the necessary resources.

2. Create Azure Maps Resources

Open a browser and go to Azure Portal. If you don't have an account you can go for a Free Trail

1. After you log in to Azure, you will see something like below. And if you are not familiar with Azure we can group the resources on Azure within "Resource Groups". Click on "Resource Groups" on the left side.

Azure 1

2. Create a Resource Group

Create Resource Group

  1. Pick the right Subscription from the dropdown, In Azure Subscription is the high-level container of the resources and within a Subscription, we can have a number of resource groups, which are the containers of the actual Azure Service/Resources we create.
  2. Give it a Name, any name. There might be some restrictions and it will be validated as you type.
  3. Select the Region where you want the resources to be created, Azure has data centers across the world and you can find more information about the regions here.
  4. Click Review + Create
  5. Once the Resource Group is created, navigate to that page and click on the '+' sign to add a resource.
  6. In the search bar, look for Azure Maps and click Create

3. Create Azure Maps resource

  1. Pick the Subscription
  2. Pick the Resource Group, You can pick we created in the first step. (I have named mine "Learning")
  3. Give it a name to your Azure Maps
  4. And finally, select a pricing tier.
    There are 2 options available here

    • Standard S0
    • Standard S1

    You can click on the below link to find more information about the pricing details and the tier feature differences. Azure Maps Pricing Tier Details

  5. Agree to the conditions

  6. Click Create
  7. Azure will now start the deployment of the resource requested and once done, You will see a button "Go to Resource", click on that to go to our Azure Maps Resource.
  8. You will see something similar to the below. The brain and heart for this resource is in Azure, and the way we communicate to it is using KEYS

Azure Maps Authentication

Click on the Authentication menu on the left and you will see important information here about how we (client) can communicate with this Azure Maps Resource.

As shown clearly there are 2 ways to Authenticate the client, we are going with the second approach, using Shared Key Authentication

Azure provides us with 2 Keys to work with and also highly recommends that we cycle through them quite often.

Copy the Primary key to clipboard

We are done here for now. Let's get back to VS and make the connection between our .NET Core Project and the Azure Maps Resource (using the Primary Key, Obviously!!)

-- Going to update --

Thank you
Vijaya Malla
@vijayamalla