Skip to content

Commit 6acfe71

Browse files
authored
Merge pull request #280283 from stevemunk/powerBI-add-ref-layer
Updates to Azure Maps Power BI Visual - Add Reference Layer
2 parents 6169c97 + 973a82f commit 6acfe71

File tree

5 files changed

+45
-5
lines changed

5 files changed

+45
-5
lines changed
622 KB
Loading
28 KB
Loading
42.4 KB
Loading
43.7 KB
Loading

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

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Microsoft Azure Maps Power BI visual
44
description: This article describes how to use the reference layer in Azure Maps Power BI visual.
55
author: deniseatmicrosoft
66
ms.author: limingchen
7-
ms.date: 12/04/2023
7+
ms.date: 07/10/2024
88
ms.topic: how-to
99
ms.service: azure-maps
1010
services: azure-maps
@@ -18,6 +18,7 @@ Reference layers enable the enhancement of spatial visualizations by overlaying
1818
- [WKT] (Well-Known Text) files with a `.wkt` extension
1919
- [KML] (Keyhole Markup Language) files with a `.kml` extension
2020
- [SHP] (Shapefile) files with a `.shp` extension
21+
- [CSV] (Comma-separated values) files with a `.csv` extension. The Azure Maps Power BI visual parses the column containing WKT (Well-Known Text) strings from the sheet.
2122

2223
## Add a spatial dataset as a reference layer
2324

@@ -30,7 +31,7 @@ To upload a spatial dataset as a reference layer:
3031
1. Navigate to the **Format** pane.
3132
1. Expand the **Reference Layer** section.
3233
1. Select **File Upload** from the **Type** drop-down list.
33-
1. Select **Browse**. The file selection dialog opens, allowing you to choose a file with a `.json`, `.geojson`, `.wkt`, `.kml` or `.shp` extension.
34+
1. Select **Browse**. The file selection dialog opens, allowing you to choose a file with a `.json`, `.geojson`, `.wkt`, `.kml`, `.shp`, or `.csv` extension.
3435

3536
:::image type="content" source="./media/power-bi-visual/reference-layer-upload.png" alt-text="Screenshot showing the reference layers section when uploading a file control.":::
3637

@@ -43,11 +44,11 @@ To use a hosted spatial dataset as a reference layer:
4344
1. Navigate to the **Format** pane.
4445
1. Expand the **Reference Layer** section.
4546
1. Select **URL** from the **Type** drop-down list.
46-
1. Select **Enter a URL** and enter a valid URL pointing to your hosted file. Hosted files must be a valid spatial dataset with a `.json`, `.geojson`, `.wkt`, `.kml` or `.shp` extension. After the link to the hosted file is added to the reference layer, the URL appears in the **Enter a URL** field. To remove the data from the visual simply delete the URL.
47+
1. Select **Enter a URL** and enter a valid URL pointing to your hosted file. Hosted files must be a valid spatial dataset with a `.json`, `.geojson`, `.wkt`, `.kml`, `.shp`, or `.csv` extension. After the link to the hosted file is added to the reference layer, the URL appears in the **Enter a URL** field. To remove the data from the visual delete the URL.
4748

4849
:::image type="content" source="./media/power-bi-visual/reference-layer-hosted.png" alt-text="Screenshot showing the reference layers section when using the 'Enter a URL' input control.":::
4950

50-
1. Alternatively, you can create a dynamic URL using Data Analysis Expressions ([DAX]) based on fields, variables or other programmatic elements. By utilizing DAX, the URL will dynamically change based on filters, selections, or other user interactions and configurations. For more information, see [Expression-based titles in Power BI Desktop].
51+
1. Alternatively, you can create a dynamic URL using Data Analysis Expressions ([DAX]) based on fields, variables, or other programmatic elements. By utilizing DAX, the URL will dynamically change based on filters, selections, or other user interactions and configurations. For more information, see [Expression-based titles in Power BI Desktop].
5152

5253
:::image type="content" source="./media/power-bi-visual/reference-layer-hosted-dax.png" alt-text="Screenshot showing the reference layers section when using DAX for the URL input.":::
5354

@@ -61,7 +62,7 @@ The following are all settings in the **Format** pane that are available in the
6162

6263
| Setting | Description |
6364
|----------------------|---------------|
64-
| Reference layer data | The data file to upload to the visual as another layer within the map. Selecting **Browse** shows a list of files with a `.json`, `.geojson`, `.wkt`, `.kml` or `.shp` file extension that can be opened. |
65+
| Reference layer data | The data file to upload to the visual as another layer within the map. Selecting **Browse** shows a list of files with a `.json`, `.geojson`, `.wkt`, `.kml`, `.shp`, or `.csv` file extension that can be opened. |
6566

6667
## Styling data in a reference layer
6768

@@ -108,6 +109,44 @@ POINT(-122.13284 47.63699)
108109
</kml>
109110
```
110111

112+
## Custom style for reference layer via format pane
113+
114+
The _Custom style for reference layer via format pane_ feature in Azure Maps enables you to personalize the appearance of reference layers. You can define the color, border width, and transparency of points, lines, and polygons directly in the Azure Maps Power BI visual interface, to enhance the visual clarity and impact of your geospatial data.
115+
116+
:::image type="content" source="./media/power-bi-visual/custom-style-for-reference-layer-via-format-pane.png" alt-text="A map displaying the custom style for reference layer via format pane feature.":::
117+
118+
### Enabling Custom Styles
119+
120+
To use the custom styling options for reference layers, follow these steps:
121+
122+
1. **Upload Geospatial Files**: Start by uploading your supported geospatial files (GeoJSON, KML, WKT, CSV, or Shapefile) to Azure Maps as a reference layer.
123+
2. **Access Format Settings**: Navigate to the Reference Layer blade within the Azure Maps Power BI visual settings.
124+
3. **Customize Styles**: Use to adjust the appearance of your reference layer by setting the fill color, border color, border width, and transparency for points, lines, and polygons.
125+
126+
> [!NOTE]
127+
> If your geospatial files (GeoJSON, KML) include predefined style properties, Power BI will utilize those styles rather than the settings configured in the format pane. Make sure your files are styled according to your requirements before uploading if you intend to use custom properties defined within them.
128+
129+
### Style Configuration
130+
131+
| Setting name | Description | Setting values |
132+
|---------------------|------------------------------------------------------|----------------------------------------------------------------------|
133+
| Fill Colors | Fill color of points and polygons. | Set colors for different data category or gradient for numeric data. |
134+
| Border Color | The color of the points, lines, and polygons outline.| Color picker |
135+
| Border width | The width of the border in pixels. Default: 3 px | Width 1-10 pixels |
136+
| Border transparency |  The transparency of the borders. Default: 0% | Transparency 0-100% |
137+
138+
The **Points** section of the format visual pane:
139+
140+
:::image type="content" source="./media/power-bi-visual/points.png" alt-text="A screenshot displaying the points section of the format visual pane.":::
141+
142+
The **Lines** section of the format visual pane:
143+
144+
:::image type="content" source="./media/power-bi-visual/lines.png" alt-text="A screenshot displaying the lines section of the format visual pane.":::
145+
146+
The **polygons** section of the format visual pane:
147+
148+
:::image type="content" source="./media/power-bi-visual/polygons.png" alt-text="A screenshot displaying the polygons section of the format visual pane.":::
149+
111150
## Next steps
112151

113152
Add more context to the map:
@@ -122,6 +161,7 @@ Add more context to the map:
122161
[WKT]: https://wikipedia.org/wiki/Well-known_text_representation_of_geometry
123162
[KML]: https://wikipedia.org/wiki/Keyhole_Markup_Language
124163
[SHP]: https://en.wikipedia.org/wiki/Shapefile
164+
[CSV]: https://en.wikipedia.org/wiki/Comma-separated_values
125165
[2016 census tracts for Colorado]: https://github.com/Azure-Samples/AzureMapsCodeSamples/tree/master/Static/data/geojson
126166
[supported style properties]: spatial-io-add-simple-data-layer.md#default-supported-style-properties
127167
[Add a tile layer]: power-bi-visual-add-tile-layer.md

0 commit comments

Comments
 (0)