Skip to content

Commit 687876a

Browse files
authored
Merge pull request MicrosoftDocs#3635 from MicrosoftDocs/iawilt-pmr-custom-pins
updates to include customization
2 parents e45ee6b + 88006ae commit 687876a

File tree

7 files changed

+52
-37
lines changed

7 files changed

+52
-37
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ powerapps-docs/.vs/powerapps-docs/v15/.suo
1717
powerapps-docs/.vs/ProjectSettings.json
1818
powerapps-docs/.vs/slnx.sqlite
1919
powerapps-docs/.vs/VSWorkspaceState.json
20+
/.vs/slnx.sqlite-journal

powerapps-docs/maker/canvas-apps/geospatial-component-map.md

Lines changed: 51 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
---
2-
title:
3-
description:
2+
title: Insert interactive maps into apps
3+
description: Insert maps, and add customized pins, in Power Apps.
44
author: iaanw
55
manager: shellha
66
ms.service: powerapps
77
ms.topic: conceptual
8-
ms.custom: canvas
8+
ms.custom: canvas, ce06122020
99
ms.reviewer: tapanm
10-
ms.date: 7/7/2020
10+
ms.date: 11/10/2020
1111
ms.author: iawilt
1212
search.audienceType:
1313
- maker
1414
search.app:
1515
- PowerApps
16-
ms.custom: ce06122020
1716
---
1817

1918

@@ -44,7 +43,7 @@ With an app open for editing in the [Power Apps studio](https://create.powerapps
4443
1. Open the **Insert** tab.
4544
2. Expand **Media**.
4645
3. Select the component **Map** to place it in the center of the app screen, or drag it to position it anywhere on the screen.
47-
4. (Optional) Select **Allow** in the window that asks to know your ___location. This enables the component to display the user's current ___location.
46+
4. (Optional) Select **Allow** in the window that asks to know your ___location. This setting allows the component to display the user's current ___location.
4847

4948
![Allow highlighted in the window that asks to know your ___location](./media/geospatial/address-allow.png "Allow highlighted in the window that asks to know your ___location")
5049

@@ -56,33 +55,40 @@ You can load a table that contains existing data from an Excel workbook into the
5655

5756
Your workbook needs to contain a named table with the following columns that should then be mapped to the associated property in the component's **Advanced** pane.
5857

59-
Column description | Maps to property
60-
-- | --
61-
Label for the pin | ItemsLabels
62-
Longitude of the pin | ItemsLongitudes
63-
Latitude of the pin | ItemsLattitudes
58+
Column description | Maps to property | Required
59+
-- | -- | --
60+
Label for the pin | ItemsLabels | Required
61+
Longitude of the pin | ItemsLongitudes | Required
62+
Latitude of the pin | ItemsLatitudes | Required
63+
Color of the pin | ItemsColors | Optional
64+
Icon for the pin | ItemsIcons | Optional
65+
66+
67+
68+
The color field accepts any CSS string, as defined in [Color enumeration and ColorFade, ColorValue, and RGBA functions in Power Apps](/functions/function-colors).
69+
70+
You can use the icons described in the [List of image templates](/azure/azure-maps/how-to-use-image-templates-web-sdk#list-of-image-templates) topic as your icon.
6471

65-
You can also use a string to denote the address, in which case ItemsLongitudes and ItemsLatitudes won't work.
6672

73+
The following Excel table shows the required columns:
6774

68-
The following is an example of an Excel table with the required columns:
6975

70-
![Sample excel file with a table named TestData and containing Name, Longitude, and Latitude columns](./media/geospatial/sample-excel.png)
76+
:::image type="content" source="media/geospatial/sample-excel.png" alt-text="Sample excel file with a table named TestData and containing Name, Longitude, and Latitude columns":::
7177

7278
You can copy the following sample data to test this functionality:
7379

74-
Name | Longitude | Latitude
75-
-- | -- | --
76-
Fourth Coffee (sample) | -98.29277 | 26.2774
77-
Litware, Inc. (sample) | -96.85572 | 32.55253
78-
Adventure Works (sample) | -96.99952 | 32.72058
79-
Fabrikam, Inc. (sample) | -118.30746 | 34.86543
80-
Blue Yonder Airlines (sample) | -118.66184 | 34.17553
81-
City Power & Light (sample) | -113.46184 | 37.15363
82-
Contoso Pharmaceuticals (sample) | -80.26711 | 40.19918
83-
Alpine Ski House (sample) | -102.63908 | 35.20919
84-
A. Datum Corporation (sample) | -89.39433 | 40.71025
85-
Coho Winery (sample) | -116.97751 | 32.87466
80+
Name | Longitude | Latitude | Color | Icon
81+
-- | -- | -- | -- | --
82+
Fourth Coffee (sample) | -98.29277 | 26.2774 | Blue | marker-flat
83+
Litware, Inc. (sample) | -96.85572 | 32.55253 | #ffefcd| hexagon-thick
84+
Adventure Works (sample) | -96.99952 | 32.72058 | | car
85+
Fabrikam, Inc. (sample) | -118.30746 | 34.86543 | |
86+
Blue Yonder Airlines (sample) | -118.66184 | 34.17553 | |
87+
City Power & Light (sample) | -113.46184 | 37.15363 | |
88+
Contoso Pharmaceuticals (sample) | -80.26711 | 40.19918 | |
89+
Alpine Ski House (sample) | -102.63908 | 35.20919 | |
90+
A Datum Corporation (sample) | -89.39433 | 40.71025 | |
91+
Coho Winery (sample) | -116.97751 | 32.87466 | |
8692

8793

8894

@@ -91,23 +97,24 @@ Coho Winery (sample) | -116.97751 | 32.87466
9197

9298
1. Select one of the cells, and then on the Home tab in the ribbon, select **Format as Table** and choose any style, and then **OK**.
9399

94-
![](./media/geospatial/convert-table.png)
100+
![Screenshot highlighting the format as table option in Excel](./media/geospatial/convert-table.png)
95101

96102
1. Select the table, and then go to the **Table Design** tab on the ribbon. Enter a name for the table under **Table Name:**, for example *TestData*.
97103

98-
![](./media/geospatial/table-name.png)
104+
![Screenshot highlighting the table name in Excel](./media/geospatial/table-name.png)
99105

100106
1. Save the workbook.
101107

102108
1. Open or create a new app in Power Apps, and insert the map component.
103109

104-
1. On the **Properties** pane, select the **Data source(Items)** field and then search for *excel* and select **Import from Excel**.
110+
1. On the **Properties** pane, select the **Locations(Items)** field and then search for *excel* and select **Import from Excel**.
111+
112+
:::image type="content" source="media/geospatial/select-excel.png" alt-text="Screenshot of the Import from Excel option.":::
105113

106-
![](./media/geospatial/select-excel.png)
107114

108115
1. Locate the Excel workbook and then select **Open**. Select the table that contains the information, **TestData**, and then **Connect**.
109116

110-
![](./media/geospatial/select-table.png)
117+
![Screenshot of the table selection panel](./media/geospatial/select-table.png)
111118

112119
1. On the **Properties** pane, go to the **Advanced** tab, and select **More options**.
113120

@@ -116,10 +123,15 @@ Coho Winery (sample) | -116.97751 | 32.87466
116123
- **ItemsLabels** as *TestData.Name*
117124
- **ItemLatitudes** as *TestData.Latitude*
118125
- **ItemsLongitudes** as *TestData.Longitude*
126+
- (Optional) **ItemsColors** as *TestData.Colors*
127+
- (Optional) **ItemsIcons** as *TestData.Icons*
128+
129+
1. The map component will now show each row in the table as a pin, labeled with its *Name* as defined in the Excel table, and using the provided icons and colors. If an icon or color isn't provided, then the component will use the default icon and color.
130+
131+
![A screenshot of the map component with custom icons and different colors.](./media/geospatial/pins-map.png)
132+
119133

120-
1. The map component will now show each row in the table as a pin, labeled with its *Name* as defined in the Excel table.
121134

122-
![](./media/geospatial/map-expanded.png)
123135

124136
### Properties
125137

@@ -145,10 +157,12 @@ Some properties are only available on the **Advanced** tab in the **Properties**
145157
| Pin color | The color of the pins. | Color picker | Properties |
146158
| Maximum map pins | Maximum number of pins displayed on the map. | Integer | Properties |
147159
| ItemsLabels | A column in Items with the strings you want to use as labels for the pins. | TableName.ColumnName | Advanced |
148-
| ItemsAddresses | A column in Items with the strings that represent the ___location of the pins. Doesn't work with **ItemsLongitudes** or **ItemsLatitudes**. | TableName.ColumnName | Advanced |
149-
| ItemsLongitudes | Name of the column in the table in your data source with floating-point numbers that represent the longitude position of the pins. Doesn't work with **ItemsAddresses**. | TableName.ColumnName | Advanced |
150-
| ItemsLatitudes | Name of the column in the table in your data source with floating-point numbers that represent the latitude position of the pins. Doesn't work with **ItemsAddresses**. | TableName.ColumnName | Advanced |
151-
| Items_Items | Name of the table in your data source that contains all the records that you want to plot in the map by using pins. Each row must have an entry for the label, longitude, and latitude for each row. | TableName | Advanced |
160+
| ItemsAddresses | A column in Items with the strings that represent the ___location of the pins. | TableName.ColumnName | Advanced |
161+
| ItemsLongitudes | Name of the column in the table in your data source with floating-point numbers that represent the longitude position of the pins. | TableName.ColumnName | Advanced |
162+
| ItemsLatitudes | Name of the column in the table in your data source with floating-point numbers that represent the latitude position of the pins. | TableName.ColumnName | Advanced |
163+
| ItemsColors | Color of the pins | [Any CSS color string](/functions/function-colors) | Advanced |
164+
| ItemsIcons | Icon of the pins | [Icons defined in Azure image templates](/azure/azure-maps/how-to-use-image-templates-web-sdk#list-of-image-templates) | Advanced |
165+
| Items | Name of the table in your data source that contains all the records that you want to plot in the map by using pins. Each row must have an entry for the label, longitude, and latitude for each row. | TableName | Advanced |
152166

153167
### Additional properties
154168

191 KB
Loading
41.2 KB
Loading
212 KB
Loading
5.24 KB
Loading
4.8 KB
Loading

0 commit comments

Comments
 (0)