The premise:
I'm building an app for my nonprofit that calculates the distance travelled for a work visit. From the amount of kilometres driven, we then calculate the expenses we need to pay out to colleagues.
What I've got:
I managed to make this all work using 'Bingmaps.Getroute'.
For this part I only needed 2 text inputs with addresses. I noticed they only needed to fill out a minimum of info, that being street name and locality, with house number and postal code being optional (we don't use states).
Kilometres * price per kilometre = amount to receive
Easy peasy
GREAT!
What I can't get done:
As this Getroute calculation just puts out a number of km's, and wanted to show this route on a map, so they can double check if it matches the reality of the route they travelled.
What I've tried:
The Getmap and GetmapV2 fuctions only seem to work with latitude an longtitude.
The Getroute just calculates, I can't get it to show a map in a image frame
I also found this URL
https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0=Seattle,WA;64;1&wp.1=Redmond,WA;66;2&key={BingMapsAPIKey}
But for this I need to separate street, house number, postal code and locality in different datacards
Help?!
As Bing is clearly able to get a route very easily from a string of info in one text field, how do I get it to translate that into a map? What am I missing? I've googled myself cross-eyed, and keep getting the options to get a static map, or to calculate with coordinates. I'm getting heart palpitations, please help.
I solved it using
"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0= " & AddressInput1.SelectedLatitude & ", " & AddressInput1.SelectedLongitude & ";64;1&wp.1= " & AddressInput2.SelectedLatitude & " , " & AddressInput2.SelectedLongitude & ";66;2&key={Bingkey}"
It says bingmap in the left corner at the picture.
I doubt that that is using BingMaps.
I would like to be proven wrong though, since I faced a similar issue myself (actually it was for the same purpose as what you did). I just added an option for users to manually enter the distance they drove if they didn't agree with the suggested distance from the GetRoute. Even if its possible to show the exact map on the route, I don't think there would be a way for a user to change it while leaving the start and end point intact, so I didn't really see the point of it.
BingMaps that you suggest is only for one address? I would like to get a picture of the route, just as they have done here https://www.youtube.com/watch?v=9SZ35C_BU2g
at 5.58
The only solution I've seen for this is to have an automate generate a picture of the route, then send that back to powerapps.
You can also use BingMaps.GetLocationByAddress( this will return longitude and latitude
Did you solve your issue, I am sitting with the same one
WarrenBelz
89
Most Valuable Professional
MS.Ragavendar
58
Michael E. Gernaey
42
Super User 2025 Season 1