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
Copy file name to clipboardExpand all lines: articles/digital-twins/how-to-integrate-maps.md
+19-20Lines changed: 19 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -27,43 +27,42 @@ This how-to will cover:
27
27
28
28
### Prerequisites
29
29
30
-
1. Follow the Azure Digital Twins [Tutorial: Connect an end-to-end solution](./tutorial-end-to-end.md).
31
-
1. You'll be extending this twin with an additional endpoint and route. You will also be adding another function to your function app from that tutorial.
32
-
2. Follow the Azure Maps [Tutorial: Use Azure Maps Creator to create indoor maps](../azure-maps/tutorial-creator-indoor-maps.md) to create an Azure Maps indoor map with a *feature stateset*.
33
-
1.[Feature statesets](../azure-maps/creator-indoor-maps.md#feature-statesets) are collections of dynamic properties (states) assigned to dataset features such as rooms or equipment. In the Azure Maps tutorial above, the feature stateset stores room status that you will be displaying on a map.
34
-
1. You will need your feature *stateset ID* and Azure Maps *subscription ID*.
30
+
* Follow the Azure Digital Twins [Tutorial: Connect an end-to-end solution](./tutorial-end-to-end.md).
31
+
* You'll be extending this twin with an additional endpoint and route. You will also be adding another function to your function app from that tutorial.
32
+
* Follow the Azure Maps [Tutorial: Use Azure Maps Creator to create indoor maps](../azure-maps/tutorial-creator-indoor-maps.md) to create an Azure Maps indoor map with a *feature stateset*.
33
+
*[Feature statesets](../azure-maps/creator-indoor-maps.md#feature-statesets) are collections of dynamic properties (states) assigned to dataset features such as rooms or equipment. In the Azure Maps tutorial above, the feature stateset stores room status that you will be displaying on a map.
34
+
* You will need your feature *stateset ID* and Azure Maps *subscription ID*.
35
35
36
36
### Topology
37
37
38
38
The image below illustrates where the indoor maps integration elements in this tutorial fit into a larger, end-to-end Azure Digital Twins scenario.
39
39
40
40
:::image type="content" source="media/how-to-integrate-maps/maps-integration-topology.png" alt-text="A view of Azure services in an end-to-end scenario, highlighting the Indoor Maps Integration piece" lightbox="media/how-to-integrate-maps/maps-integration-topology.png":::
41
41
42
-
## Create a function to update a map using twin update notifications
42
+
## Create a function to update a map when twins update
43
43
44
-
First, you'll create a route in Azure Digital Twins to forward all twin update events to an Event Grid topic. Then, you'll use an Azure function to read those update messages and update a feature stateset in Azure Maps.
44
+
First, you'll create a route in Azure Digital Twins to forward all twin update events to an event grid topic. Then, you'll use an Azure function to read those update messages and update a feature stateset in Azure Maps.
45
45
46
46
## Create a route and filter to twin update notifications
47
47
48
48
Azure Digital Twins instances can emit twin update events whenever a twin's state is updated. The [Azure Digital Twins tutorial: Connect an end-to-end solution](./tutorial-end-to-end.md) linked above walks through a scenario where a thermometer is used to update a temperature attribute attached to a room's twin. You'll be extending that solution by subscribing to update notifications for twins, and using that information to update our maps.
49
49
50
50
This pattern reads from the room twin directly, rather than the IoT device, which gives us the flexibility to change the underlying data source for temperature without needing to update our mapping logic. For example, you can add multiple thermometers or set this room to share a thermometer with another room, all without needing to update our map logic.
51
51
52
-
1. Create an Event Grid topic, which will receive events from our Azure Digital Twins instance.
53
-
```azurecli
54
-
az eventgrid topic create -g <your-resource-group-name> --name <your-topic-name> -l <region>
55
-
```
52
+
1. Create an event grid topic, which will receive events from our Azure Digital Twins instance.
53
+
```azurecli
54
+
az eventgrid topic create -g <your-resource-group-name> --name <your-topic-name> -l <region>
55
+
```
56
56
57
-
2. Create an endpoint to link your Event Grid topic to Azure Digital Twins.
## Store your maps information in the Azure Digital Twins graph
151
+
## Store your maps information in Azure Digital Twins
153
152
154
153
Now that you have a hardcoded solution to updating your maps information, you can use the Azure Digital Twins graph to store all of the information necessary for updating your indoor map. This would include the stateset ID, maps subscription ID, and feature ID of each map and location respectively.
0 commit comments