Fri, 08/06/2021 - 14:03 By Danny Rodrigue…

Dynamics PCF : Bing Map 

Presentation

In this article, we discuss the Geo Code button and the Interactive Map feature that can be used together to display a specific location on a map.

But what if we want to display multiple locations on a single map? That was a requirement we've received for a project and to solve it, we've come across the Bing Maps Grid PCF.

This PowerApps Component Framework allows displaying a view as a map. For each record of the view, latitude and longitude information must be provided. The PCF will then used that information and display a pin on the location of every record.

Map

 

Set up

First, download the BingMapsGridControl managed solution from the project GitHub releases page.

Then you need to have a view ready. The view needs to have at least three fields: a name - must be a field of type SingleLine.Text -  and the latitude and longitude information - also 

Once the view is ready, you can open it via the classic editor. Then hit the Custom Controls button, add the Bing Maps Grid control and fill the properties with at least the three fields described above.

config

 

In the list of parameters, you also need to fill in the last one: Bing Maps API Key. To retrieve your API Key, just go to the Bing Maps Dev center, under My account and My Keys. If you don't have a key, just create one directly from the interface, the process is straightforward.

bingMapsAPI

 

Then you can publish the view and everything is ready !

pin

When you click on a pin, three information are available: the name of the record (the one configured in the PCF properties), another SingleLine.Text field (also configurable in the properties), and a link to open the record.

References

Dynamics PCF : Bing Map

Tags

Add new comment

Image CAPTCHA
Enter the characters shown in the image.