Skip to content

Commit 1a9b297

Browse files
authored
Merge pull request #229466 from brendansco/creator-toc-update-030323
Creator toc update 030323
2 parents 798513c + 84592fb commit 1a9b297

10 files changed

+352
-402
lines changed

.openpublishing.redirection.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7784,15 +7784,25 @@
77847784
"redirect_document_id": false
77857785
},
77867786
{
7787-
"source_path_from_root": "/articles/azure-maps/mobility-service-data-structure.md ",
7787+
"source_path_from_root": "/articles/azure-maps/mobility-service-data-structure.md",
77887788
"redirect_url": "/azure/azure-maps",
77897789
"redirect_document_id": false
77907790
},
77917791
{
7792-
"source_path_from_root": "/articles/azure-maps/power-bi-visual-getting-started.md ",
7792+
"source_path_from_root": "/articles/azure-maps/power-bi-visual-getting-started.md",
77937793
"redirect_url": "/azure/azure-maps/power-bi-visual-get-started",
77947794
"redirect_document_id": false
77957795
},
7796+
{
7797+
"source_path_from_root": "/articles/azure-maps/tutorial-creator-wfs.md",
7798+
"redirect_url": "/azure/azure-maps/how-to-creator-wfs",
7799+
"redirect_document_id": false
7800+
},
7801+
{
7802+
"source_path_from_root": "/articles/azure-maps/tutorial-creator-feature-stateset.md",
7803+
"redirect_url": "/azure/azure-maps/how-to-creator-feature-stateset",
7804+
"redirect_document_id": false
7805+
},
77967806
{
77977807
"source_path_from_root": "/articles/azure-portal/resource-group-portal-linked-resources.md",
77987808
"redirect_url": "/azure/azure-portal/azure-portal-dashboards",
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
title: Create a feature stateset
3+
titleSuffix: Microsoft Azure Maps Creator
4+
description: How to create a feature stateset using the Creator REST API.
5+
author: brendansco
6+
ms.author: Brendanc
7+
ms.date: 03/03/2023
8+
ms.topic: how-to
9+
ms.service: azure-maps
10+
services: azure-maps
11+
---
12+
13+
# Create a feature stateset
14+
15+
[Feature statesets] define dynamic properties and values on specific features that support them. This article explains how to create a stateset that defines values and corresponding styles for a property and changing a property's state.
16+
17+
## Prerequisites
18+
19+
* Successful completion of [Query datasets with WFS API].
20+
* The `datasetId` obtained in the [Check the dataset creation status] section of the *Use Creator to create indoor maps* tutorial.
21+
22+
>[!IMPORTANT]
23+
>
24+
> * This article uses the `us.atlas.microsoft.com` geographical URL. If your Creator service wasn't created in the United States, you must use a different geographical URL. For more information, see [Access to Creator Services].
25+
> * In the URL examples in this article you will need to replace:
26+
> * `{Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
27+
> * `{datasetId}` with the `datasetId` obtained in the [Check the dataset creation status] section of the *Use Creator to create indoor maps* tutorial
28+
29+
## Create the feature stateset
30+
31+
To create a stateset:
32+
33+
Create a new **HTTP POST Request** that uses the [Stateset API]. The request should look like the following URL:
34+
35+
```http
36+
https://us.atlas.microsoft.com/featurestatesets?api-version=2.0&datasetId={datasetId}&subscription-key={Your-Azure-Maps-Subscription-key}
37+
```
38+
39+
Next, set the `Content-Type` to `application/json` in the **Header** of the request.
40+
41+
If using a tool like [Postman], it should look like this:
42+
43+
:::image type="content" source="./media/tutorial-creator-indoor-maps/stateset-header.png"alt-text="A screenshot of Postman showing the Header tab of the POST request that shows the Content Type Key with a value of application forward slash json.":::
44+
45+
Finally, in the **Body** of the HTTP request, include the style information in raw JSON format, this applies different colors to the `occupied` property depending on its value:
46+
47+
```json
48+
{
49+
"styles":[
50+
{
51+
"keyname":"occupied",
52+
"type":"boolean",
53+
"rules":[
54+
{
55+
"true":"#FF0000",
56+
"false":"#00FF00"
57+
}
58+
]
59+
}
60+
]
61+
}
62+
```
63+
64+
After the response returns successfully, copy the `statesetId` from the response body. In the next section, you'll use the `statesetId` to change the `occupancy` property state of the unit with feature `id` "UNIT26". If using Postman, it will appear as follows:
65+
66+
:::image type="content" source="./media/tutorial-creator-indoor-maps/response-stateset-id.png"alt-text="A screenshot of Postman showing the resource Stateset ID value in the responses body.":::
67+
68+
## Update a feature state
69+
70+
In this section you will learn how to update the `occupied` state of the unit with feature `id` "UNIT26". To do this, create a new **HTTP PUT Request** calling the [Feature Statesets API]. The request should look like the following URL (replace `{statesetId}` with the `statesetId` obtained in [Create a feature stateset](#create-a-feature-stateset)):
71+
72+
```http
73+
https://us.atlas.microsoft.com/featurestatesets/{statesetId}/featureStates/UNIT26?api-version=2.0&subscription-key={Your-Azure-Maps-Subscription-key}
74+
```
75+
76+
Next, set the `Content-Type` to `application/json` in the **Header** of the request.
77+
78+
If using a tool like [Postman], it should look like this:
79+
80+
:::image type="content" source="./media/tutorial-creator-indoor-maps/stateset-header.png"alt-text="A screenshot of the header tab information for stateset creation.":::
81+
82+
Finally, in the **Body** of the HTTP request, include the style information in raw JSON format, this applies different colors to the `occupied` property depending on its value:
83+
84+
```json
85+
{
86+
"states": [
87+
{
88+
"keyName": "occupied",
89+
"value": true,
90+
"eventTimestamp": "2020-11-14T17:10:20"
91+
}
92+
]
93+
}
94+
```
95+
96+
>[!NOTE]
97+
> The update will be saved only if the time posted stamp is after the time stamp of the previous request.
98+
99+
Once the HTTP request is sent and the update completes, you'll receive a `200 OK` HTTP status code. If you implemented [dynamic styling] for an indoor map, the update displays at the specified time stamp in your rendered map.
100+
101+
## Additional information
102+
103+
* For information on how to retrieve the state of a feature using its feature id, see [Feature State - List States].
104+
* For information on how to delete the stateset and its resources, see [Feature State - Delete Stateset].
105+
* For information on using the Azure Maps Creator [Feature State service] to apply styles that are based on the dynamic properties of indoor map data features, see how to article [Implement dynamic styling for Creator indoor maps].
106+
107+
* For more information on the different Azure Maps Creator services discussed in this article, see [Creator Indoor Maps].
108+
109+
## Next steps
110+
111+
Learn how to implement dynamic styling for indoor maps.
112+
113+
> [!div class="nextstepaction"]
114+
> [dynamic styling]
115+
116+
[Access to Creator Services]: how-to-manage-creator.md#access-to-creator-services
117+
[Query datasets with WFS API]: how-to-creator-wfs.md
118+
[Stateset API]: /rest/api/maps/v2/feature-state/create-stateset
119+
[Feature Statesets API]: /rest/api/maps/v2/feature-state/create-stateset
120+
[Feature statesets]: /rest/api/maps/v2/feature-state
121+
[Check the dataset creation status]: tutorial-creator-indoor-maps.md#check-the-dataset-creation-status
122+
[dynamic styling]: indoor-map-dynamic-styling.md
123+
[Feature State - List States]: /rest/api/maps/v2/feature-state/list-states
124+
[Feature State - Delete Stateset]: /rest/api/maps/v2/feature-state/delete-stateset
125+
[Feature State service]: /rest/api/maps/v2/feature-state
126+
[Implement dynamic styling for Creator indoor maps]: indoor-map-dynamic-styling.md
127+
[Creator Indoor Maps]: creator-indoor-maps.md
128+
[Postman]: https://www.postman.com/

articles/azure-maps/how-to-creator-wayfinding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: Indoor Maps wayfinding service
33
titleSuffix: Microsoft Azure Maps Creator
44
description: How to use the wayfinding service to plot and display routes for indoor maps in Microsoft Azure Maps Creator
5-
author: eriklindeman
6-
ms.author: eriklind
5+
author: brendansco
6+
ms.author: Brendanc
77
ms.date: 10/25/2022
88
ms.topic: how-to
99
ms.service: azure-maps
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title: Query datasets using the Web Feature Service
3+
titleSuffix: Microsoft Azure Maps Creator
4+
description: How to Query datasets with Web Feature Service (WFS)
5+
author: brendansco
6+
ms.author: Brendanc
7+
ms.date: 03/03/2023
8+
ms.topic: how-to
9+
ms.service: azure-maps
10+
services: azure-maps
11+
---
12+
13+
# Query datasets using the Web Feature Service
14+
15+
This article describes how to query Azure Maps Creator [datasets] using [Web Feature Service (WFS)]. You can use the WFS API to query for all feature collections or a specific collection within a dataset. For example, you can use WFS to find all mid-size meeting rooms in a specific building and floor level.
16+
17+
## Prerequisites
18+
19+
* Successful completion of [Tutorial: Use Creator to create indoor maps].
20+
* The `datasetId` obtained in [Check dataset creation status] section of the *Use Creator to create indoor maps* tutorial.
21+
22+
This article uses the same sample indoor map as used in the Tutorial: Use Creator to create indoor maps.
23+
24+
>[!IMPORTANT]
25+
>
26+
> * This article uses the `us.atlas.microsoft.com` geographical URL. If your Creator service wasn't created in the United States, you must use a different geographical URL. For more information, see [Access to Creator Services].
27+
> * In the URL examples in this article you will need to replace:
28+
> * `{Azure-Maps-Subscription-key}` with your Azure Maps subscription key.
29+
> * `{datasetId}` with the `datasetId` obtained in the [Check the dataset creation status] section of the *Use Creator to create indoor maps* tutorial.
30+
31+
## Query for feature collections
32+
33+
To query all collections in your dataset, create a new **HTTP GET Request**:
34+
35+
Enter the following URL to [WFS API]. The request should look like the following URL:
36+
37+
```http
38+
https://us.atlas.microsoft.com/wfs/datasets/{datasetId}/collections?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=2.0
39+
```
40+
41+
The response body is returned in GeoJSON format and contains all collections in the dataset. For simplicity, the example here only shows the `unit` collection. To see an example that contains all collections, see [WFS Describe Collections API]. To learn more about any collection, you can select any of the URLs inside the `links` element.
42+
43+
```json
44+
{
45+
"collections": [
46+
{
47+
"name": "unit",
48+
"description": "A physical and non-overlapping area which might be occupied and traversed by a navigating agent. Can be a hallway, a room, a courtyard, etc. It is surrounded by physical obstruction (wall), unless the is_open_area attribute is equal to true, and one must add openings where the obstruction shouldn't be there. If is_open_area attribute is equal to true, all the sides are assumed open to the surroundings and walls are to be added where needed. Walls for open areas are represented as a line_element or area_element with is_obstruction equal to true.",
49+
"links": [
50+
{
51+
"href": "https://atlas.microsoft.com/wfs/datasets/{datasetId}/collections/unit/definition?api-version=1.0",
52+
"rel": "describedBy",
53+
"title": "Metadata catalogue for unit"
54+
},
55+
{
56+
"href": "https://atlas.microsoft.com/wfs/datasets/{datasetId}/collections/unit/items?api-version=1.0",
57+
"rel": "data",
58+
"title": "unit"
59+
}
60+
{
61+
"href": "https://atlas.microsoft.com/wfs/datasets/{datasetId}/collections/unit?api-version=1.0",
62+
"rel": "self",
63+
"title": "Metadata catalogue for unit"
64+
}
65+
]
66+
},
67+
```
68+
69+
## Query for unit feature collection
70+
71+
In this section, you'll query [WFS API] for the `unit` feature collection.
72+
73+
To query the unit collection in your dataset, create a new **HTTP GET Request**:
74+
75+
```http
76+
https://us.atlas.microsoft.com/wfs/datasets/{datasetId}/collections/unit/items?subscription-key={Your-Azure-Maps-Subscription-key}&api-version=2.0
77+
```
78+
79+
After the response returns, copy the feature `id` for one of the `unit` features. In the following example, the feature `id` is "UNIT26". You'll use "UNIT26" as your feature `id` when you [Update a feature state].
80+
81+
```json
82+
{
83+
"type": "FeatureCollection",
84+
"features": [
85+
{
86+
"type": "Feature",
87+
"geometry": {
88+
"type": "Polygon",
89+
"coordinates": ["..."]
90+
},
91+
"properties": {
92+
"original_id": "b7410920-8cb0-490b-ab23-b489fd35aed0",
93+
"category_id": "CTG8",
94+
"is_open_area": true,
95+
"navigable_by": [
96+
"pedestrian"
97+
],
98+
"route_through_behavior": "allowed",
99+
"level_id": "LVL14",
100+
"occupants": [],
101+
"address_id": "DIR1",
102+
"name": "157"
103+
},
104+
"id": "UNIT26",
105+
"featureType": ""
106+
}, {"..."}
107+
]
108+
}
109+
```
110+
111+
> [!div class="nextstepaction"]
112+
> [How to create a feature stateset]
113+
114+
[datasets]: /rest/api/maps/v2/dataset
115+
[WFS API]: /rest/api/maps/v2/wfs
116+
[Web Feature Service (WFS)]: /rest/api/maps/v2/wfs
117+
[Tutorial: Use Creator to create indoor maps]: tutorial-creator-indoor-maps.md
118+
[Check dataset creation status]: tutorial-creator-indoor-maps.md#check-the-dataset-creation-status
119+
[Access to Creator Services]: how-to-manage-creator.md#access-to-creator-services
120+
[WFS Describe Collections API]: /rest/api/maps/v2/wfs/get-collection-definition
121+
[Update a feature state]: how-to-creator-feature-stateset.md#update-a-feature-state
122+
[How to create a feature stateset]: how-to-creator-feature-stateset.md

0 commit comments

Comments
 (0)