Skip to content

Commit 4dba570

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/azure-docs-pr (branch live)
2 parents 52a864b + 24d2e99 commit 4dba570

37 files changed

+650
-231
lines changed

articles/api-center/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,7 @@
9090
items:
9191
- name: Samples and labs
9292
href: resources.md
93+
- name: Building an API security strategy
94+
href: https://aka.ms/API-Security-EBook
9395
- name: Azure updates
9496
href: https://aka.ms/apic/updates

articles/api-management/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,8 @@
657657
href: /azure/architecture/best-practices/api-design?toc=%2Fazure%2Fapi-management%2Ftoc.json&bc=/azure/api-management/breadcrumb/toc.json
658658
- name: Web API implementation
659659
href: /azure/architecture/best-practices/api-implementation?toc=%2Fazure%2Fapi-management%2Ftoc.json&bc=/azure/api-management/breadcrumb/toc.json
660+
- name: Building an API security strategy
661+
href: https://aka.ms/API-Security-EBook
660662
- name: Breaking changes and retirements
661663
items:
662664
- name: Breaking changes overview

articles/api-management/authentication-authorization-overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,4 @@ While authorization is preferred, and OAuth 2.0 has become the dominant method o
154154
## Next steps
155155
* Learn more about [authentication and authorization](../active-directory/develop/authentication-vs-authorization.md) in the Microsoft identity platform.
156156
* Learn how to [mitigate OWASP API security threats](mitigate-owasp-api-threats.md) using API Management.
157+
* Learn how to [build a comprehensive API security strategy](https://aka.ms/API-Security-EBook)

articles/api-management/mitigate-owasp-api-threats.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,5 +318,6 @@ Learn more about:
318318
* [Authentication and authorization in API Management](authentication-authorization-overview.md)
319319
* [Security baseline for API Management](/security/benchmark/azure/baselines/api-management-security-baseline)
320320
* [Security controls by Azure policy](security-controls-policy.md)
321+
* [Building a comprehensive API security strategy](https://aka.ms/API-Security-EBook)
321322
* [Landing zone accelerator for API Management](/azure/cloud-adoption-framework/scenarios/app-platform/api-management/landing-zone-accelerator)
322323
* [Microsoft Defender for Cloud](/azure/defender-for-cloud/defender-for-cloud-introduction)

articles/api-management/protect-with-defender-for-apis.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,5 @@ You can remove APIs from protection by Defender for APIs by using Defender for C
112112

113113
* Learn more about [Defender for Cloud](/azure/defender-for-cloud/defender-for-cloud-introduction)
114114
* Learn more about [API findings, recommendations, and alerts](/azure/defender-for-cloud/defender-for-apis-posture) in Defender for APIs
115+
Learn how to [build a comprehensive API security strategy](https://aka.ms/API-Security-EBook)
115116
* Learn how to [upgrade and scale](upgrade-and-scale.md) an API Management instance

articles/azure-app-configuration/feature-management-python-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ zone_pivot_groups: feature-management
2323

2424
:::zone target="docs" pivot="preview-version"
2525

26-
[![Feature Management](https://img.shields.io/pypi/v/FeatureManagement/2.0.0b1?color=blue)](https://pypi.org/project/FeatureManagement/2.0.0b1/)<br>
26+
[![Feature Management](https://img.shields.io/pypi/v/FeatureManagement/2.0.0b2?color=blue)](https://pypi.org/project/FeatureManagement/2.0.0b2/)<br>
2727

2828
:::zone-end
2929

@@ -54,7 +54,7 @@ As an example, a Microsoft Edge browser feature filter could be designed. This f
5454

5555
### Feature flag configuration
5656

57-
A Python dictionary is used to define feature flags. The dictionary is composed of feature names as keys and feature flag objects as values. The feature flag object is a dictionary that contains an `EnabledFor` key. The `EnabledFor` key is a list of feature filters that are used to determine if the feature should be enabled.
57+
A Python dictionary is used to define feature flags. The dictionary is composed of feature names as keys and feature flag objects as values. The feature flag object is a dictionary that contains a `conditions` key, which itself contains the `client_filters` key. The `client_filters` key is a list of feature filters that are used to determine if the feature should be enabled.
5858

5959
### Feature flag declaration
6060

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: Add custom protocol PMTiles in the Web SDK | Microsoft Azure Maps
3+
description: Learn how to add custom protocol PMTiles using the Web SDK.
4+
author: sinnypan
5+
ms.author: sipa
6+
ms.date: 10/13/2024
7+
ms.topic: how-to
8+
ms.service: azure-maps
9+
ms.subservice: web-sdk
10+
---
11+
12+
# Add custom protocol PMTiles
13+
14+
The Azure Maps Web SDK supports custom protocols such as [PMTiles]. The `pmtiles://` protocol is used to reference PMTiles archives, which are single-file formats for storing tiled data such as vector and raster maps. This protocol allows Azure Maps to access specific tiles within a PMTiles archive using an HTTP request, fetching only the necessary data on demand.
15+
16+
## Add custom protocol
17+
18+
By using the `addProtocol` function, which registers a callback triggered before any AJAX request made by the library, you can intercept, modify, and return the request for further processing and rendering. This enables the implementation of a custom callback function to load resources when a URL starts with the designated custom schema.
19+
20+
The first step is to add a reference to the protocol. The following example references the `pmtiles` library:
21+
22+
```html
23+
<script src="https://unpkg.com/[email protected]/dist/pmtiles.js"></script>
24+
```
25+
26+
Next, initialize the MapLibre PMTiles protocol.
27+
28+
```js
29+
//Initialize the plugin.
30+
const protocol = new pmtiles.Protocol();
31+
atlas.addProtocol("pmtiles", (request) => {
32+
return new Promise((resolve, reject) => {
33+
const callback = (err, data) => {
34+
if (err) {
35+
reject(err);
36+
} else {
37+
resolve({ data });
38+
}
39+
};
40+
protocol.tile(request, callback);
41+
});
42+
});
43+
```
44+
45+
## Add PMTiles protocol
46+
47+
To add the PMTiles protocol, hook the data source with the specified protocol URL schema. The following sample uses the [Overture] building dataset to add building data over the basemap.
48+
49+
```js
50+
const PMTILES_URL = "https://overturemaps-tiles-us-west-2-beta.s3.amazonaws.com/2024-07-22/buildings.pmtiles";
51+
protocol.add(new pmtiles.PMTiles(PMTILES_URL));
52+
```
53+
54+
## Add PMTiles as a map source
55+
56+
PMTiles are added as a map source during the map event. Once added, the specified URL schema is available to the Azure Maps Web SDK. In the following sample, the PMTiles URL is added as a `VectorTileSource`.
57+
58+
```js
59+
//Add the source to the map.
60+
map.sources.add(
61+
new atlas.source.VectorTileSource("pmtiles", {
62+
type: "vector",
63+
url: `pmtiles://${PMTILES_URL}`,
64+
})
65+
);
66+
```
67+
68+
> [!NOTE]
69+
> Using the `pmtiles://` protocol automatically creates the `minzoom` and `maxzoom` properties for the source.
70+
71+
## Enhance map with Overture data
72+
73+
Overture provides a unified and comprehensive [data schema] designed to organize and structure geospatial data effectively. This schema is divided into different themes, each representing a specific type of geospatial information.
74+
75+
The following sample uses the building theme's properties (for example, building type and height) to demonstrate building extrusion and differentiate between building categories on the basemap, rather than just showing building footprints.
76+
77+
```js
78+
//Create a polygon extrusion layer.
79+
layer = new atlas.layer.PolygonExtrusionLayer(
80+
"pmtiles",
81+
"building",
82+
{
83+
sourceLayer: "building",
84+
height: ["get", "height"],
85+
fillOpacity: 0.5,
86+
fillColor: [
87+
"case",
88+
['==', ['get', 'subtype'], 'agricultural'],
89+
"wheat",
90+
['==', ['get', 'subtype'], 'civic'],
91+
"teal",
92+
['==', ['get', 'subtype'], 'commercial'],
93+
"blue",
94+
['==', ['get', 'subtype'], 'education'],
95+
"aqua",
96+
['==', ['get', 'subtype'], 'entertainment'],
97+
"pink",
98+
['==', ['get', 'subtype'], 'industrial'],
99+
"yellow",
100+
['==', ['get', 'subtype'], 'medical'],
101+
"red",
102+
['==', ['get', 'subtype'], 'military'],
103+
"darkgreen",
104+
['==', ['get', 'subtype'], 'outbuilding'],
105+
"white",
106+
['==', ['get', 'subtype'], 'religious'],
107+
"khaki",
108+
['==', ['get', 'subtype'], 'residential'],
109+
"green",
110+
['==', ['get', 'subtype'], 'service'],
111+
"gold",
112+
['==', ['get', 'subtype'], 'transportation'],
113+
"orange",
114+
"grey",
115+
],
116+
filter: ['any', ['==', ['geometry-type'], 'Polygon'], ['==', ['geometry-type'], 'MultiPolygon']]
117+
}
118+
);
119+
```
120+
121+
The following image shows a screenshot displaying the extrusion of buildings of different types near Central Park in New York City.
122+
123+
:::image type="content" source="media/add-custom-protocol-pmtiles/pmtiles-building.png" lightbox="media/add-custom-protocol-pmtiles/pmtiles-building.png" alt-text="A screenshot demonstrating the custom protocol pmtiles.":::
124+
125+
For a fully functional sample with source code, see [Azure Maps Samples GitHub Repo].
126+
127+
<!--
128+
For more PMTiles samples, see [Azure Maps Samples].
129+
[Azure Maps Samples]: https://samples.azuremaps.com/?search=pmtiles
130+
-->
131+
132+
## Next Steps
133+
134+
The following articles are related to custom protocol PMTiles:
135+
136+
> [!div class="nextstepaction"]
137+
> [Create Data Source](create-data-source-web-sdk.md)
138+
139+
> [!div class="nextstepaction"]
140+
> [Data Driven Style Expressions](data-driven-style-expressions-web-sdk.md)
141+
142+
[Azure Maps Samples GitHub Repo]: https://github.com/Azure-Samples/AzureMapsCodeSamples/blob/main/Samples/PMTiles/Overture%20Building%20Theme/Buildings.html
143+
[data schema]: https://docs.overturemaps.org/schema
144+
[Overture]: https://overturemaps.org
145+
[PMTiles]: https://docs.protomaps.com/pmtiles
1.61 MB
Loading

articles/azure-maps/power-bi-visual-add-reference-layer.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,142 @@ The **polygons** section of the format visual pane:
147147

148148
:::image type="content" source="./media/power-bi-visual/polygons.png" alt-text="A screenshot displaying the polygons section of the format visual pane.":::
149149

150+
## Data-Bound Reference Layer
151+
152+
The Data-Bound Reference Layer enables the association of data with specific shapes in the reference layer based on common attributes.
153+
154+
To use the Data-Bound Reference layer, drag the column containing unique identifiers (can be location data or not) to the Location field of the Azure Maps Visual.
155+
156+
:::image type="content" source="media/power-bi-visual/data-bound-reference-layer/location-field.png" alt-text="A screenshot showing the location field in Power BI desktop.":::
157+
158+
Azure Maps matches these identifiers with the corresponding properties in the uploaded spatial file, automatically linking your data to the shapes on the map.
159+
160+
In scenarios with multiple properties, Azure Maps identifies a common property in each shape and compares its value with the selected data column in the Location field. It then uses the property that has the highest number of matches with the selected data column.
161+
162+
:::image type="content" source="media/power-bi-visual/data-bound-reference-layer/data-bound-reference-layer.png" lightbox="media/power-bi-visual/data-bound-reference-layer/data-bound-reference-layer.png" alt-text="A screenshot showing the Data-Bound Reference Layer example in Power BI desktop.":::
163+
164+
If one or more shapes in the reference layer can't be automatically mapped to any data point, you can manage these unmapped objects by following these steps:
165+
166+
1. Select the **Format visual** tab in the **Visualizations** pane.
167+
1. Select **Reference layer**.
168+
1. Select **Unmapped Objects**.
169+
1. Select the **Show** toggle switch to toggle On/Off. This highlights shapes that aren't mapped to any data points.
170+
171+
Optionally, select the **Use custom colors** toggle switch to toggle On/Off custom fill and border colors for unmapped objects to make them visually distinct on the map.
172+
173+
:::image type="content" source="media/power-bi-visual/data-bound-reference-layer/data-bound-reference-layer-unmapped-objects.png" lightbox="media/power-bi-visual/data-bound-reference-layer/data-bound-reference-layer-unmapped-objects.png" alt-text="A screenshot showing the Data-Bound Reference Layer example in Power BI desktop with unmapped objects showing in a different color.":::
174+
175+
<!----------------------------------------------------------------------------
176+
### Key matching example
177+
178+
#### Semantic model
179+
180+
| Datapoint | Country | City | Office name |
181+
|-------------|---------|----------|-------------|
182+
| Datapoint_1 | US | New York | Office C |
183+
| Datapoint_1 | US | Seattle | Office A |
184+
| Datapoint_1 | US | LA | Office B |
185+
186+
#### Reference layer data (take GeoJSON as an example)
187+
188+
```json
189+
{
190+
"type": "FeatureCollection",
191+
"features": [
192+
{
193+
"type": "Feature",
194+
"properties": {
195+
"name": "Office A",
196+
"shape": "Shape_1",
197+
"id": "Office A"
198+
},
199+
"geometry": {
200+
"type": "Polygon",
201+
"coordinates": [
202+
...
203+
}
204+
},
205+
{
206+
"type": "Feature",
207+
"properties": {
208+
"name": "Office B",
209+
"shape": "Shape_2",
210+
"id": "Office B"
211+
},
212+
"geometry": {
213+
"type": "Point",
214+
"coordinates": [
215+
...
216+
]
217+
}
218+
},
219+
{
220+
"type": "Feature",
221+
"properties": {
222+
"name": "Office C",
223+
"shape": "Shape_3"
224+
},
225+
"geometry": {
226+
"type": "Point",
227+
"coordinates": [
228+
...
229+
]
230+
}
231+
},
232+
{
233+
"type": "Feature",
234+
"properties": {
235+
"name": "Office D",
236+
"shape": "Shape_4"
237+
},
238+
"geometry": {
239+
"type": "Polygon",
240+
"coordinates": [
241+
...
242+
]
243+
}
244+
}
245+
]
246+
}
247+
```
248+
249+
#### the mapping results
250+
251+
| | Location bucket|Mapping result |
252+
|-----------------|----------------|--------------------------------------------------------------------------------|
253+
| Case 1 | Office name | Shape_1 ↔ Datapoint_2 |
254+
| | | Shape_2 ↔ Datapoint_3 |
255+
| | | Shape_3 ↔ Datapoint_1 |
256+
| | | Shape_4 ↔ x (Since there’s no datapoint with Office name “Office D”) |
257+
| Case 2 | City | Nothing is mapped, since there’s no property that contains matched City names. |
258+
259+
Note that there is a property “id” also has “Office x” values that is not being used, but instead the property “name” is used for data mapping since it has 3 datapoints matched and “id” only has 2 datapoints matched.
260+
261+
---------------------------------------------------------------------------------------------------------------------------->
262+
263+
## Conditional Formatting
264+
265+
Conditional formatting can be applied to data to dynamically change the appearance of shapes on a map based on the provided data. For instance, gradient colors can visualize various data values such as population density, sales performance, or other metrics. This is a powerful tool for combining spatial and business data to create interactive and visually compelling reports.
266+
267+
:::image type="content" source="media/power-bi-visual/data-bound-reference-layer/conditional-formatting.png" alt-text="A screenshot showing the Conditional Formatting controls for points, lines, polygons, and unmanaged objects in the reference layer control in Power BI desktop.":::
268+
269+
There are several ways to set colors to the shapes. The following table shows the priorities used:
270+
271+
| Priority | Source | Description |
272+
|----------|-------------------------------|-----------------------------------------------------------------|
273+
| 1 | Preset style in spatial files | Color and style as defined in the spatial file |
274+
| 2 | Unmapped object colors | Custom colors used when the geometry isn’t data-bound |
275+
| 3 | Legend colors | Colors provided by Legend/Series |
276+
| 4 | Conditional formatting colors | Colors provided by conditional formatting |
277+
| 5 | Custom formatting colors | User defined custom styles in the Reference Layer options in the formatting pane |
278+
| 6 | Default colors | Default colors defined in the Azure Maps visual |
279+
280+
> [!TIP]
281+
>
282+
> The Azure Maps Power BI Visual can only perform geocoding on valid location data such as geographical coordinates, addresses, or place names. If no valid location data is uploaded, data layers that depend on geocoded locations, such as heat maps or bubble layers, won’t display on the map.
283+
>
284+
> The Data-Bound Reference Layer will appear on the map as long as the data column contains unique identifiers that match properties in the spatial file, but to ensure correct results, your data column must include valid geographic information.
285+
150286
## Next steps
151287

152288
Add more context to the map:

0 commit comments

Comments
 (0)