Directions throwing error "Cannot read property 'waypointResolved' of null"

Manasi Gore 21 Reputation points
2021-06-03T14:42:31.297+00:00

I am working on integrating Bing maps into my website. & every time I click on the transit button to get the transit route on the maps, the map shows driving directions (which is I know a default route directions) hence the transit route is not getting set for the first attempt. But on second click I can see the transit routes on the map. Why is this happening? I tried debugging every where not sure where is it failing which is why its showing me default directions

below is the chunk of code where I am setting the requestOptions for transit

else if (routeModeBus.classList.contains("selected")) {
        directionsManager.setRequestOptions({
          routeMode: Microsoft.Maps.Directions.RouteMode.transit,
        });
      }

also on the browser console I get this error every time i click on the driving buttons -

mapcontrol?callback=loadMapScenario&key=AsyMg-fxT-JbhEgtHmOxhE3PW2DajpjzxJvUYoZ6mU6PEB_WtCmLsRntOEJWcSz5:12 Uncaught TypeError: Cannot read property 'waypointResolved' of null
at U5SQJbDBDbiGdgcJIP46s5HfCkc.br.js:1
at n.f.getLocation.f.getAddress.u.callback (U5SQJbDBDbiGdgcJIP46s5HfCkc.br.js:1)
at UaKQaemVLmoPow_MBm5629S0P8w.br.js:1
at gq7Ks6ZLnH9Rj-im3p5Ey7F7qOw.br.js:1
at s (LTPecIqdAZMMbmo-loVR3sAItBg.br.js:1)
at Object.t.callbacks.<computed> [as f6ca95] (LTPecIqdAZMMbmo-loVR3sAItBg.br.js:1)
at VM48506:1

Bing Custom Search
Bing Custom Search
An easy-to-use, ad-free, commercial-grade search tool that lets you deliver the results you want.
87 questions
0 comments No comments
{count} votes

Accepted answer
  1. GiftA-MSFT 11,166 Reputation points
    2021-06-04T01:00:59.103+00:00

    Hi, thanks for reaching out. We do not support Bing Maps API on this forum. Please post this question on the Bing Maps forum, they may be in a better position to answer your query. Hope this helps.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.