Hi @STS1SS ,
Yes, it is indeed possible to find a street address from a latitude and longitude
Choose a Service that Offers Reverse Geocoding: Services like Bing Maps, Google Maps, and Azure Maps offer APIs for reverse geocoding.
Set Up the API: Obtain an API key from your chosen service provider and understand the API limits and cost implications.
PowerApps Integration: In PowerApps, you can use a custom connector or HTTP action in Power Automate to call the API service.
Call the API: When a user clicks on a map or you otherwise obtain a latitude and longitude, make an API request to the reverse geocoding service, passing the latitude and longitude as parameters.
For example, using Google Maps Geocoding API, an HTTP request to find an address would look like this:
GET https://maps.googleapis.com/maps/api/geocode/json?latlng={latitude},{longitude}&key=YOUR_API_KEY
Handle the Response: The API will return a JSON response with the address information. Parse this JSON to extract the street address and display it in your app.
User Interface: In PowerApps, you might have a label or text input control where you can set the text property to the address returned by the API.
Here's a conceptual example of setting up an API call within PowerApps:
// Assume you have latitude and longitude in variables lat and long
// Set up the API endpoint URL
Set(apiURL, Concatenate("https://maps.googleapis.com/maps/api/geocode/json?latlng=", lat, ",", long, "&key=YOUR_API_KEY"));
// Make the API call
ClearCollect(collectedAddress, JSON(YourHTTPFunctionToCallAPI(apiURL),JSONFormat.IncludeBinaryData));
// Now collectedAddress has the data returned by the API
// You can extract the address from here and set it to a label's text property
Set(address, First(collectedAddress).results[0].formatted_address);