How to use GPS in PowerApps.
Maps can be used to show contextual information to your users, reason for witch allowing you to represent location data in a meaningful way. Two of the most popular mapping technologies that we can use are Bing and Google Maps, both of which can be leveraged within our PowerApp. Both mapping technologies provide a free service that can also be used for commercial purposes, which adds to their popularity.
Bing?
In our case we are going to use Bing maps:
Bing maps provide a static map API that you can access with a free API key. Simply navigate to?https://www.bingmapsportal.com?and get the basic map key. You will need to register and sign in using a Microsoft account so that you can access the Bing Maps Dev Center:
You can generate a key under the My account menu by clicking on My keys. This will allow you to generate new keys or view your existing keys:
PowerApps
In PowerApps, we will use an image control to display the map, and we will simply provide the URL of the web service as the Image property:
领英推荐
When we place an image control on the canvas, we simply need to put the full URL, plus the relevant query string parameters, into the formula bar. Assuming that the call was successful, a map will be returned. The Bing Maps web service will process the web request based on the parameters that are supplied and will return a graphic displaying the relevant information:
Rather than statically putting the mapping parameters directly into the URL, we can replace them with inputs from other controls within the PowerApp. For example, we could use dropdowns so that we can select the mapping type, and the coordinates could be entered in text boxes. In the following screenshot, the map type has been set from the Type dropdown and the location has been taken from the TLocation text box.
You can use Google maps if?you like.
For further questions: Feel free to comment bellow. Thanks.
Director and Consulting Geologist at H&S Consultants (formerly Hellman & Schofield)
9 个月hi, as an extension of this, how do we use/cache a map when user losses internet connection?