I just discover PowerApps and i want to know if it s possible to make an app for calculate distance between two adresses. i want my user can have a file where all professionnal car ride can be save per month for each month.
Example :
- User enter the date of path
- User type city 1 to city 2 API (if i can have some predictive adresse like Waze or other GPS apps it s better)
- API calculate kilometer for ride car between 2 points
- Then save the result into a file where title is username and month = User1August2017
- in this file i can have all the drive path of the august month and a formula can calculate with a ratio the fee to refund for my employee.
Is there a way to get the distance across countries? GetRoute seems to only work if it is drive-able, but we would like to get travel distance even if flying.
What about creating a gallery and having the miles populate for each row? So far, I see that I can press a button to calculate the miles. Could this feature become dynamic?
Not sure - the results come from Bing directly. Can you try looking at the "dist" variable (on the ribbon, select View -> Variables, then select it), especially the "routeLegs" property, to see if it the start/end points actually match the results. Sometimes it's possible that Bing will consider one of your start/end points a place other than the one that you want.
Thanks! @CarlosFigueira It seems to be working for most of the states I've tested except Delaware. For example, from Middletown, DE to Camden, DE is about 30 miles, but PowerApps is displaying 305 miles instead. Any reason why this may be happening?
You can request the unit to be returned in miles from the Bing Maps connector itself:
Set( dist, BingMaps.GetRoute( "San Francisco, CA", "Los Angeles, CA", { distanceUnit: "Mile" }))
You can find more details on the documentation for the Bing Maps connector.
@CarlosFigueira Hello! How do you converted the distance to display in Miles instead of KM?
This is great, worked like a charm!
You can use the Bing Maps connector to calculate a distance between two cities:
Once you have that connection added, you can use the GetRoute function to calculate the distance between two addresses. For example, in a button you can have the following formula on its OnSelect property:
Set(dist, BingMaps.GetRoute("San Francisco, CA", "Los Angeles, CA"))
And after clicking the button you can get the distance by accessing the properties in the dist variable, for example, in the Text property of a label:
"Distance: " & dist.travelDistance & " " & dist.distanceUnit
Is there any news about this feature ?
Thanks
yeah i don t see API plugin for calculate distance between two points like google map our other.
I can do it with excel file, so for moment i try to do an App for just collect data per user into database
MS.Ragavendar
14
LC-26081402-0
10
stampcoin
6