Skip to main content

Notifications

Community site session details

Community site session details

Session Id : dhYKQPIUQW9SO+34iBP6hw
Power Apps - Building Power Apps
Answered

Get Adress/City/Country by lon,lat using Microsoft Azure Maps

Like (0) ShareShare
ReportReport
Posted on 20 Apr 2021 14:53:11 by

Hello everyone,

 

I'm struggling to find a way to get these three elements : city, address, postal code, country by longitude and latitude using the Azure Maps (if there is any function that satisfies this) 'cause Bings maps are a paid tool I don't wish to integrate here.. How can I do that please ?

 

PS: I tried a tip with the bing maps like this : BingMaps.GetLocationByPoint(longitude, latitude).address.countryRegion and I hope there is a similar function that does the same using Azure Map 😕

 

Any ideas please ?

Thanks in advance !

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on 23 Apr 2021 at 07:42:31
    Re: Get Adress/City/Country by lon,lat using Microsoft Azure Maps

    Hi @Anonymous,

    Could you please check mu solution again?

    I have explained that  Address input component is a Text input where you enter address to find other geographic elements rather than get address. 

    You could not get the address by located Latitude and Longitude values which is not possible with Azure Maps.

    Regards,

    Qi

  • Community Power Platform Member Profile Picture
    on 23 Apr 2021 at 07:25:07
    Re: Get Adress/City/Country by lon,lat using Microsoft Azure Maps

    Hello @v-qiaqi-msft ,

    Yes that's what I'm looking for, a function to get address by lon,lat location 'cause I already have the Latitude and Longitude values. I exactly need to get the address associated with the point located with those two so I can then return the country name, street, city etc. Is that possible with azure maps ?

    Thanks in advance !

  • v-qiaqi@microsoft.com Profile Picture
    on 21 Apr 2021 at 04:11:47
    Re: Get Adress/City/Country by lon,lat using Microsoft Azure Maps

    Hi @Anonymous,

    Based on the issue that you mentioned, do you want to get geographic positions using Azure Maps?

    Actually, it is a preview feature with a premium license which means that you should pay more for it.

    I have a test on my side, please take a try as below.

    Add 2 Text input control to display longitude and latitude

    Add a Toggle to control whether to display the current GPS position or not

    Add a Button to launch the position with "latitude and longitude" to the map.

    Set the following formulas to the OnCheck and UnCheck property of the Toggle:

     

    Set(CurrentLocation,{Lat:Location.Latitude,Lon:Location.Longitude}) // OnCheck
    Set(CurrentLocation,{}) // OnUncheck

     

    Set the Default property of the Text Input as below:

     

    CurrentLocation.Lat
    CurrentLocation.Lon

     

    Set the OnSelect of the Button as below:

     

    ClearCollect (Positions, {Lat: Value (TextInput1.Text), Lon: Value (TextInput2.Text), Name: "CurrentPosition"})

     

    After that, we could get a collection of our own current GPS position, just set this collection as the Data Source of the Map, and set the following properties:

     

    Positions.Lat //ItemsLatitudes
    Positions.Lon //ItemsLongitudes

    As to the address, I want to clarify to you that Address input component is a Text input where you enter address to find other geographic elements rather than get address.

    For more details, please check the following article and blog:

    Insert interactive maps into apps - Power Apps | Microsoft Docs

    Account address capture & mapping with Power Apps - Jukka Niiranen

    Powerapps, Azure Maps y Geoespatial Features | CompartiMOSS

    Hope it could help you.

    Regards,

    Qi

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started