cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
robdriessen
Level: Powered On

Bing Maps connector : Transit option

I'm using the Bing Maps connector for calculating travel distances and travel duration, for the default 'Driving' travelMode it works fine, but for the 'Transit' travelMode I just can't get it to work.

I'm not sure what the cause is, but it might be the dateTime property, which is required when using 'Transit' travelMode.

 

I use now something like this :

 

Set(
dist_ov,
BingMaps.GetRoute(
Gallery2_1.Selected.persoon.'Primair adres: Straat' & " " & Gallery2_1.Selected.persoon.'Primair adres: Plaats',
Gallery1_1.Selected.crmrow_accountid.address2_line1 & " " & Gallery1_1.Selected.crmrow_accountid.address2_city,{travelMode:"Transit",dateTime:DateTimeValue("10/11/2020 1:50:24.765 PM","nl"),timeType:"Arrival"}
)
);
 
Which results in a request as this :
 
{
"method": "POST",
"headers": {
"x-ms-user-agent": "PowerApps/3.19123.15 (Web AuthoringTool; AppName=xxxxxxxxxxxxxxxxxxxxxxxx)",
"x-ms-client-session-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"x-ms-client-request-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Accept-Language": "en-US",
"Accept": "*/*",
"Cache-Control": "no-cache, no-store",
"x-ms-request-method": "GET",
"x-ms-request-url": "/apim/bingmaps/xxxxxxxxxxxxxxxxxxxxxx/REST/V1/Routes/Driving?wp.0=Achter+de+Carmel+NIJMEGEN&wp.1=Griffioenlaan+UTRECHT&travelMode=Transit&dateTime=10%2F11%2F2020+1%3A50+PM&timeType=Arrival"
}
}
 
Anyone any ideas ?
2 REPLIES 2
Microsoft v-siky-msft
Microsoft

Re: Bing Maps connector : Transit option

@robdriessen 

 

The seconds in DateTimeValue function is not supported as a decimal. Please try this:

 

Set(
dist_ov,
BingMaps.GetRoute(
Gallery2_1.Selected.persoon.'Primair adres: Straat' & " " & Gallery2_1.Selected.persoon.'Primair adres: Plaats',
Gallery1_1.Selected.crmrow_accountid.address2_line1 & " " & Gallery1_1.Selected.crmrow_accountid.address2_city,{travelMode:"Transit",dateTime:DateTimeValue("10/11/2020 1:50:24 PM","nl"),timeType:"Arrival"}
)
);
Sik
robdriessen
Level: Powered On

Re: Bing Maps connector : Transit option

@v-siky-msft 

Thanks for your reply, but makes no difference, still have the same problem, I get the same travel duration for the transit option as I get for the (default) driving option.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,418)