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/azure-maps/azure-maps-event-grid-integration.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,15 +15,16 @@ ms.custom: mvc
15
15
16
16
Azure Maps integrates with Azure Event Grid, so that users can send event notifications to other services and trigger downstream processes. The purpose of this article is to help you configure your business applications to listen to Azure Maps events. This allows users to react to critical events in a reliable, scalable, and secure manner. For example, users can build an application to update a database, create a ticket, and deliver an email notification, every time a device enters a geofence.
17
17
18
-
Azure Event Grid is a fully managed event routing service, which uses a publish-subscribe model. Event Grid has built-in support for Azure services like [Azure Functions](../azure-functions/functions-overview.md) and [Azure Logic Apps](../azure-functions/functions-overview.md). It can deliver event alerts to non-Azure services using webhooks. For a complete list of the event handlers that Event Grid supports, see [An introduction to Azure Event Grid](../event-grid/overview.md).
18
+
> [!NOTE]
19
+
> The Geofence API async event requires the region property of your Azure Maps account be set to ***Global***. When creating an Azure Maps account in the Azure portal, this isn't given as an option. For more information, see [Create an Azure Maps account with a global region](tutorial-geofence.md#create-an-azure-maps-account-with-a-global-region).
19
20
21
+
Azure Event Grid is a fully managed event routing service, which uses a publish-subscribe model. Event Grid has built-in support for Azure services like [Azure Functions](../azure-functions/functions-overview.md) and [Azure Logic Apps](../azure-functions/functions-overview.md). It can deliver event alerts to non-Azure services using webhooks. For a complete list of the event handlers that Event Grid supports, see [An introduction to Azure Event Grid](../event-grid/overview.md).
Event grid uses [event subscriptions](../event-grid/concepts.md#event-subscriptions) to route event messages to subscribers. An Azure Maps account emits the following event types:
27
+
Event grid uses [event subscriptions](../event-grid/concepts.md#event-subscriptions) to route event messages to subscribers. An Azure Maps account emits the following event types:
27
28
28
29
| Event type | Description |
29
30
| ---------- | ----------- |
@@ -68,6 +69,7 @@ The following example shows the schema for GeofenceResult:
68
69
69
70
Applications that handle Azure Maps geofence events should follow a few recommended practices:
70
71
72
+
* The Geofence API async event requires the region property of your Azure Maps account be set to ***Global***. When creating an Azure Maps account in the Azure portal, this isn't given as an option. For more information, see [Create an Azure Maps account with a global region](tutorial-geofence.md#create-an-azure-maps-account-with-a-global-region).
71
73
* Configure multiple subscriptions to route events to the same event handler. It's important not to assume that events are from a particular source. Always check the message topic to ensure that the message came from the source that you expect.
72
74
* Use the `X-Correlation-id` field in the response header to understand if your information about objects is up to date. Messages can arrive out of order or after a delay.
73
75
* When a GET or a POST request in the Geofence API is called with the mode parameter set to `EnterAndExit`, then an Enter or Exit event is generated for each geometry in the geofence for which the status has changed from the previous Geofence API call.
@@ -77,4 +79,4 @@ Applications that handle Azure Maps geofence events should follow a few recommen
77
79
To learn more about how to use geofencing to control operations at a construction site, see:
78
80
79
81
> [!div class="nextstepaction"]
80
-
> [Set up a geofence by using Azure Maps](tutorial-geofence.md)
82
+
> [Set up a geofence by using Azure Maps](tutorial-geofence.md)
Copy file name to clipboardExpand all lines: articles/azure-maps/tutorial-geofence.md
+23-4Lines changed: 23 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: 'Tutorial: Create a geofence and track devices on a Microsoft Azure Map'
3
3
description: Tutorial on how to set up a geofence. See how to track devices relative to the geofence by using the Azure Maps Spatial service
4
4
author: stevemunk
5
5
ms.author: v-munksteve
6
-
ms.date: 10/28/2021
6
+
ms.date: 02/28/2021
7
7
ms.topic: tutorial
8
8
ms.service: azure-maps
9
9
services: azure-maps
@@ -22,17 +22,36 @@ Azure Maps provides a number of services to support the tracking of equipment en
22
22
23
23
> [!div class="checklist"]
24
24
>
25
+
> * Create an Azure Maps account with a global region.
25
26
> * Upload [Geofencing GeoJSON data](geofence-geojson.md) that defines the construction site areas you want to monitor. You'll use the [Data Upload API](/rest/api/maps/data-v2/upload-preview) to upload geofences as polygon coordinates to your Azure Maps account.
26
27
> * Set up two [logic apps](../event-grid/handler-webhooks.md#logic-apps) that, when triggered, send email notifications to the construction site operations manager when equipment enters and exits the geofence area.
27
28
> * Use [Azure Event Grid](../event-grid/overview.md) to subscribe to enter and exit events for your Azure Maps geofence. You set up two webhook event subscriptions that call the HTTP endpoints defined in your two logic apps. The logic apps then send the appropriate email notifications of equipment moving beyond or entering the geofence.
28
29
> * Use [Search Geofence Get API](/rest/api/maps/spatial/getgeofence) to receive notifications when a piece of equipment exits and enters the geofence areas.
29
30
30
31
## Prerequisites
31
32
32
-
1.[Create an Azure Maps account](quick-demo-map-app.md#create-an-azure-maps-account).
33
-
2.[Obtain a primary subscription key](quick-demo-map-app.md#get-the-primary-key-for-your-account), also known as the primary key or the subscription key.
33
+
* This tutorial uses the [Postman](https://www.postman.com/) application, but you can use a different API development environment.
34
34
35
-
This tutorial uses the [Postman](https://www.postman.com/) application, but you can use a different API development environment.
35
+
## Create an Azure Maps account with a global region
36
+
37
+
The Geofence API async event requires the region property of your Azure Maps account be set to ***Global***. This isn't given as an option when creating an Azure Maps account in the Azure portal, however you do have several other options for creating a new Azure Maps account with the *global* region setting. This section lists the three methods that can be used to create an Azure Maps account with the region set to *global*.
38
+
39
+
> [!NOTE]
40
+
> The `location` property in both the ARM template and PowerShell `New-AzMapsAccount` command refer to the same property as the `Region` field in the Azure portal.
41
+
42
+
### Use an ARM template to create an Azure Maps account with a global region
43
+
44
+
You will need to [Create your Azure Maps account using an ARM template](how-to-create-template.md), making sure to set `location` to `global` in the `resources` section of the ARM template.
45
+
46
+
### Use PowerShell to create an Azure Maps account with a global region
47
+
48
+
```powershell
49
+
New-AzMapsAccount -ResourceGroupName your-Resource-Group -Name name-of-maps-account -SkuName g2 -Location global
50
+
```
51
+
52
+
### Use Azure CLI to create an Azure Maps account with a global region
53
+
54
+
The Azure CLI command [az maps account create](/cli/azure/maps/account?view=azure-cli-latest#az-maps-account-create) doesn’t have a location property, but defaults to “global”, making it useful for creating an Azure Maps account with a global region setting for use with the Geofence API async event.
0 commit comments