Reader small image

You're reading from  Learn Microsoft Power Apps - Second Edition

Product typeBook
Published inSep 2023
PublisherPackt
ISBN-139781801070645
Edition2nd Edition
Right arrow
Authors (2):
Matthew Weston
Matthew Weston
author image
Matthew Weston

Matthew is a Microsoft 365 & SharePoint specialist from the Midlands in the United Kingdom. He has spent several years working in various Consultancy roles. Matthew is the Managing Director of Vantage 365, which fuels his love of working on projects surrounding Microsoft 365, especially those that involve SharePoint, Microsoft Teams, Power Apps, and Power Automate. This could be helping businesses find solutions for their problems or offering training to help people use these technologies better. Matthew leads the Black Country Power Apps & Power Automate user group, and the Office 365 & SharePoint User Group in the West Midlands. Matt is a Microsoft Most Valuable Professional in the field of Business Applications.
Read more about Matthew Weston

Elisa Bárcena Martín
Elisa Bárcena Martín
author image
Elisa Bárcena Martín

Elisa Bárcena Martín is currently a project leader at LogiRAIL, having previously worked as a business apps specialist at Intelequia and a project analyst at GlaxoSmithKline. As a Power Platform enthusiast with more than 3 years of experience with the Power Platform, she has steadily grown from her initial role as a developer into her project leader position. She is a scientist and teacher by vocation, loving process optimization and believing in continuous improvement and learning.
Read more about Elisa Bárcena Martín

View More author details
Right arrow

Using GPS in Power Apps

In this chapter, we are going to use the GPS functionality of a mobile device to genereate some basic mapping data. Mapping data is one of the most basic, yet most powerful, forms of data that can be used and exploited as it can be used for pinpointing user actions and displaying data graphically in the context of global positioning.

This chapter differs from the previous chapters, where we used connectors to interact with data sources to retrieve and use data. Now, we are going to be using the native capabilities of Power Apps and the device itself to generate our data.

To achieve this, we will cover the following topics:

  • Placing maps into your apps
  • Capturing geographic position
  • Lab 8

Throughout this chapter, we will look at the types of data that we can capture from Power Apps and how we can use that data to enrich our apps even further.

Technical requirements

To follow along with the lab in this chapter, you will need to have completed the labs in the previous chapters. It is recommended that you use a mobile device for testing purposes.

To be able to use APIs from Bing, you will need to have a valid Microsoft account (Live, Outlook, or MSN). Likewise, for Google Maps, you will need to have a valid Google account.

Placing maps into your apps

Maps can be used to show contextual information to your users, thereby allowing you to represent location data in a meaningful way that allows the user to visualize the location rather than just providing textual information. Two of the most popular mapping technologies that we can use are Bing and Google Maps, both of which can be leveraged within Power Apps. You should be aware that commercial use of some mapping services, such as Google, does carry usage costs.

Leveraging 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 should be aware that there are enterprise-level licensing options for larger volumes of requests and wider terms of use, so be sure to use the correct license level for your requirements.

You will need to register and sign in using a Microsoft account so that you can access the Bing Maps Dev Center:

...

Feedback

We are constantly looking at improving our content, so what could be better than listening to what you as a reader have to say? Your feedback is important to us and we will do our best to incorporate it. Could you take two mins to fill out the feedback form for this book and let us know what your thoughts are about it? Here's the link: https://forms.office.com/r/STtMpJAhFS.

Thank you in advance.

In the previous chapter, we started working with data in Power Apps. Being able to use in-memory storage for your app is the key to having a performant app; however, to make a truly powerful app, we need to be able to interact with data that's stored in an external data source. The mechanisms that unlock this data and make it available in Power Apps are known as connectors.

Connectors are one of the most important elements of Power Apps development as they allow the app to consume data and services from a huge number of sources. When we talk about development, we talk about...

Technical requirements

To follow along with this chapter and to complete the lab, you will need an active Power Apps subscription (either per user, per app, or pay as you go). You will also need to have either OneDrive or OneDrive for Business as a medium for storing data.

Understanding standard connectors

Standard connectors are connectors that are freely available for use with every level of licensing within Power Apps. They are available across the entire Microsoft Power Platform, so they can be easily utilized in Power Automate and Logic Apps, as well as anything we create in Power Apps.

Standard connectors cover the most commonly used data sources, such as SharePoint, OneDrive, and even some third-party data sources, such as Google Drive. You can establish connections with these data sources either from within your Power App while editing, or outside the Power App from the data menu.

Once the connections list is open, click on Connections | New connection at the top of the page to begin the connection selection process:

Figure 9.1: New connection list

Once you've started this process, you have the ability to select a connection to any data source in the list, such as SharePoint or Dataverse, which we will explore in Chapter 21, Introducing Model...

Understanding premium connectors

Premium connectors are connectors that are available if you subscribe to premium Power Apps licensing, for example, per user, per app, or pay as you go plans. Premium connectors are created and supported by Microsoft; therefore, they will work without any further configuration. Such premium connectors also include external applications such as Salesforce, DocuSign, Survey Monkey, and Amazon. What you should always keep in mind, however, is that you will need to hold a subscription with the service provider, as well as the required Power Apps license, in order to fully utilize them. If your app uses premium functionality, then both the creator and the users will need a premium license to use it.

In the New connection list, all the premium connectors are identified by the Premium stamp. Unlike Microsoft Power Automate, there is no simple way to filter standard or premium connectors:

Figure 9.5: Premium connectors

This may be a helpful source for you to...

Understanding custom connectors

Custom connectors can offer Power Apps developers a great number of options when it comes to connecting to data. Custom connectors can be used to create a connection to a data source that hasn't been served by either the standard or premium connectors. Alternatively, they can also be used to extend the functionality of a built-in connector by connecting to further REST endpoints.

If you are not yet familiar with REST, it is short for Representational State Transfer and provides a standard for brokering communications between systems and services on the web. The whole point of it is to make communication with a service much simpler.

As an example, we could extend the actions that are available to the SharePoint connector by connecting to REST endpoints that are not made available through standard connectors, for example, the ability to break permissions inheritance.

There are several ways we can create custom connectors, depending on the preference...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learn Microsoft Power Apps - Second Edition
Published in: Sep 2023Publisher: PacktISBN-13: 9781801070645
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Matthew Weston

Matthew is a Microsoft 365 & SharePoint specialist from the Midlands in the United Kingdom. He has spent several years working in various Consultancy roles. Matthew is the Managing Director of Vantage 365, which fuels his love of working on projects surrounding Microsoft 365, especially those that involve SharePoint, Microsoft Teams, Power Apps, and Power Automate. This could be helping businesses find solutions for their problems or offering training to help people use these technologies better. Matthew leads the Black Country Power Apps & Power Automate user group, and the Office 365 & SharePoint User Group in the West Midlands. Matt is a Microsoft Most Valuable Professional in the field of Business Applications.
Read more about Matthew Weston

author image
Elisa Bárcena Martín

Elisa Bárcena Martín is currently a project leader at LogiRAIL, having previously worked as a business apps specialist at Intelequia and a project analyst at GlaxoSmithKline. As a Power Platform enthusiast with more than 3 years of experience with the Power Platform, she has steadily grown from her initial role as a developer into her project leader position. She is a scientist and teacher by vocation, loving process optimization and believing in continuous improvement and learning.
Read more about Elisa Bárcena Martín