Skip to content

Commit af55034

Browse files
authored
Merge pull request #189389 from stevemunk/SM-Geofence-How-to-Updates
Add info on creating an Azure Maps account with a global region
2 parents 8e23954 + 8ad61c4 commit af55034

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

articles/azure-maps/azure-maps-event-grid-integration.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ ms.custom: mvc
1515

1616
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.
1717

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).
1920
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).
2022

2123
![Azure Event Grid functional model](./media/azure-maps-event-grid-integration/azure-event-grid-functional-model.png)
2224

23-
2425
## Azure Maps events types
2526

26-
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:
2728

2829
| Event type | Description |
2930
| ---------- | ----------- |
@@ -68,6 +69,7 @@ The following example shows the schema for GeofenceResult:
6869

6970
Applications that handle Azure Maps geofence events should follow a few recommended practices:
7071

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).
7173
* 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.
7274
* 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.
7375
* 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
7779
To learn more about how to use geofencing to control operations at a construction site, see:
7880

7981
> [!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)

articles/azure-maps/tutorial-geofence.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Tutorial: Create a geofence and track devices on a Microsoft Azure Map'
33
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
44
author: stevemunk
55
ms.author: v-munksteve
6-
ms.date: 10/28/2021
6+
ms.date: 02/28/2021
77
ms.topic: tutorial
88
ms.service: azure-maps
99
services: azure-maps
@@ -22,17 +22,36 @@ Azure Maps provides a number of services to support the tracking of equipment en
2222

2323
> [!div class="checklist"]
2424
>
25+
> * Create an Azure Maps account with a global region.
2526
> * 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.
2627
> * 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.
2728
> * 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.
2829
> * Use [Search Geofence Get API](/rest/api/maps/spatial/getgeofence) to receive notifications when a piece of equipment exits and enters the geofence areas.
2930
3031
## Prerequisites
3132

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.
3434

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.
3655

3756
## Upload geofencing GeoJSON data
3857

0 commit comments

Comments
 (0)