web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to embed google ma...
Power Apps
Answered

How to embed google map with direction indicator in power apps

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello House,

 

I want to be able to display google map with street indicator from point A to point B i.e. from current position to destionation address, i have tried this:

 

"https://maps.googleapis.com/maps/api/directions/json?origin="&Location.Latitude&","&Location.Longitude&"&destination="&BrowseGallery1.Selected.Y_COORDINATE&"," &BrowseGallery1.Selected.X_COORDINATE&"&key=xxxxxxxxxxx"

 

the above code does not display the map nor throw any error, i will appreciate if anyone could assist. 

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to embed a Google map with direction indicator within your canvas app?

    Do you use Image control to display your Google map?

     

    Based on the formula that you mentioned, I think you have some misunderstanding with the Google Directions API (https://maps.googleapis.com/maps/api/directions/outputFormat?parameters).

    The output of Google Directions API is a JSON data or a XML data, not a Image data. Please check the following article for more details:

    https://developers.google.com/maps/documentation/directions/intro

     

    If you want to display Google map within your canvas app using Image control, you must call Google Maps Static API. More details about Google Maps Static API, please check the following:

    https://developers.google.com/maps/documentation/maps-static/dev-guide#Paths

     

    Based on the needs that you mentioned, I afraid that the Google Static Map API could not achieve your needs within PowerApps currently.

    As an alternative solution, I think the Bing Maps Imagery API could achieve your needs. I have made a test on my side, please take a try with the following workaround:4.JPG

    Set the Image property of the Image control to following:

    "https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0="&Location.Latitude&","&Location.Longitude&";64;1&wp.1="&"36.215539,138.203574"&";66;2"&"&key="&txtBingMapsKey.Text

    On your side, you should type:

    "https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0="&Location.Latitude&","&Location.Longitude&";64;1&wp.1="&BrowserGallery1.Selected.Latitute&","BrowserGallery1.Selected.Longitute&&";66;2"&"&key="&txtBingMapsKey.Text

    Note: The Latitute and Longitute represents the Latitute/Longtitute value of the Destination address, which selected from your Gallery.

    Please check the following article for more details:

    https://docs.microsoft.com/en-us/bingmaps/rest-services/imagery/get-a-static-map#get-a-map-with-road-imagery-that-displays-a-route

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello Support,

     

    Thanks for your response. I have tried from the example you gave, still map didnt show.

    below is my url:

    "https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0="&Location.Latitude&","&Location.Longitude&";64;1&wp.1="&BrowseGallery1.Selected.Y_COORDINATE&","&BrowseGallery1.Selected.X_COORDINATE&";66;2"&"&key=xxxxxxxxx" 

     

    I am using image to display the map, i will appreciate if you could tell what i am missing. Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have a field in a SharePoint List that stores date in "dd/mm/yyyy" format, i want to be to retrieve this fields and compares it with the current date using month and year only. below is what i have tried, but it's throwing error:

     

    LookUp('Imprest Budget', And(DepartmentText = dept.Value, Text(Month, "[$-en-GB]mm/yyyy") = Text(Today(), "[$-en-GB]mm/yyyy")),Text(Value(Balance),"[$-en-GB]###,###,###.00"))

     

    I will appreciate if anyone could assist.

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard