You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clarified several points - the user needs to save the connection string of device in the device registration step in order to use it near the end with the c# simulatedCar project. Also, some users may get confused between azure event hub trigger and the azure event grid tirgger as both have the same icon and similar sounding names. I emphasized that the user needs to select azure event grid trigger, which has the option at the top for adding an event subscription.
Copy file name to clipboardExpand all lines: articles/azure-maps/tutorial-iot-hub-maps.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.custom: mvc
15
15
16
16
# Tutorial: Implement IoT spatial analytics using Azure Maps
17
17
18
-
In an IoT scenario, it's common to capture and track relevant events that occur in space and time. Example scenarios include fleet management, asset tracking, mobility, and smart city applications. This tutorial guides you through a solution pattern using the Azure Maps APIs. Relevant events are captured by IoT Hub, using the event subscription model provided by the Event Grid.
18
+
In an IoT scenario, it's common to capture and track relevant events that occur in space and time. Example scenarios include fleet management, asset tracking, mobility, and smart city applications. This tutorial guides you through a solution pattern using the Azure Maps APIs. Relevant events are captured by IoT Hub, using the evVent subscription model provided by the Event Grid.
19
19
20
20
In this tutorial you will:
21
21
@@ -113,9 +113,9 @@ To implement business logic based on Azure Maps spatial analytics, we need to cr
113
113
114
114
### Create a storage account
115
115
116
-
To log event data, we'll create a general-purpose **v2storage** account in the "ContosoRental" resource group to store data as blobs. To create a storage account, follow instruction in [create a storage account](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-portal). Next we'll need to create a container to store blobs. Follow the steps below to do so:
116
+
To log event data, we'll create a general-purpose **v2storage**that provides access to all of the Azure Storage services: blobs, files, queues, tables, and disks. We'll need to place this storage account in the "ContosoRental" resource group to store data as blobs. To create a storage account, follow instruction in [create a storage account](https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-portal). Next we'll need to create a container to store blobs. Follow the steps below to do so:
117
117
118
-
1. In your storage account, navigate to Containers.
118
+
1. In your "storage account - blob, file, table, queue", navigate to Containers.
119
119
120
120

121
121
@@ -152,6 +152,9 @@ In order to connect to the IoT Hub, a device must be registered. To register a d
3. Save the **Primary Connection String** of your device to use it in a later step, in which you need to change a placeholder with this connection string.
6. Copy your status URI and append a `subscription-key` parameter to it with its value being your Azure Maps account subscription key. The status URI format should be like the one below:
191
+
6. Copy your status URI and append a `subscription-key` parameter to it. Assign the value of your Azure Maps account subscription key to the `subscription-key` parameter. The status URI format should be like the one below, and `{Subscription-key}` replaced with your subscription key.
@@ -211,11 +214,11 @@ The logic we implement in the function is using the location data coming from th
211
214
212
215
All relevant event info is then kept in the blob store. Step 5 below points to the executable code implementing such logic. Follow the steps below to create an Azure Function that sends data logs to the blob container in the blob storage account and add an Event Grid subscription to it.
213
216
214
-
1. In the Azure portal dashboard, select create a resource. Select **Compute** from the list of available resource types and then select **Function APP**.
217
+
1. In the Azure portal dashboard, select create a resource. Select **Compute** from the list of available resource types and then select **Function App**.
2. On the **Function App** creation page, name your function app. Under **Resource Group**, select **Use existing**, and select "ContosoRental" from the drop-down list. Select ".NET Core" as the Runtime Stack. Under **Storage**, select**Use existing**, select "contosorentaldata" from the drop-down list, and then select **Review+Create**.
221
+
2. On the **Function App** creation page, name your function app. Under **Resource Group**, select **Use existing**, and select "ContosoRental" from the drop-down list. Select ".NET Core" as the Runtime Stack. Under **Hosting**, for**Storage account**, select the storage account name from a prior step. In our prior step, we named the storage account **v2storage**. Then, select **Review+Create**.
6. Copy the [c# code](https://github.com/Azure-Samples/iothub-to-azure-maps-geofencing/blob/master/src/Azure%20Function/run.csx) into your function and click **Save**.
237
+
The **Azure Event Hub Trigger** and the **Azure Event Grid Trigger** have similar icons. Make sure you select the **Azure Event Grid Trigger**.
238
+
239
+
6. Copy the [c# code](https://github.com/Azure-Samples/iothub-to-azure-maps-geofencing/blob/master/src/Azure%20Function/run.csx) into your function and click **Save**. Don't click **Run** yet.
235
240
236
241
7. In the c# script, replace the following parameters:
237
242
* Replace the **SUBSCRIPTION_KEY** with your Azure Maps account primary subscription key.
@@ -242,7 +247,7 @@ All relevant event info is then kept in the blob store. Step 5 below points to t
11. Fill out subscription details, under **EVENT SUBSCRIPTION DETAILS** name your subscription and for Event Schema choose "Event Grid Schema". Under **TOPIC DETAILS** select "Azure IoT Hub Accounts" as Topic type. Choose the same subscription you used for creating the resource group, select "ContosoRental" as the "Resource Group". Choose the IoT Hub you created as a "Resource". Pick **Device Telemetry** as Event Type. After choosing these options, you'll see the "Topic Type" change to "IoT Hub" automatically.
250
+
11. Fill out subscription details, under **EVENT SUBSCRIPTION DETAILS** name your event subscription and for Event Schema choose "Event Grid Schema". Under **TOPIC DETAILS** select "Azure IoT Hub Accounts" as Topic type. Choose the same subscription you used for creating the resource group, select "ContosoRental" as the "Resource Group". Choose the IoT Hub you created as a "Resource". Pick **Device Telemetry** as Event Type. After choosing these options, you'll see the "Topic Type" change to "IoT Hub" automatically.
0 commit comments