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 ?