Bing Maps Traffic Layer infoboxes do not work the second time a Bing Maps Web Control is loaded.

Jonathan Chase 21 Reputation points
2023-06-19T11:03:08.6+00:00

I have run into this issue whilst working with an Angular app which uses the Bing Maps V8 Web Control. To recreate this issue use the interactive SDK.

  1. Open the "Add/Show Traffic Layer" sample and confirm that the infoboxes are working.

Image

  1. Load anothercomponent and then return to the traffic layer sample.
  2. Mouseover an incident an th einfobox will no longer be displayed.

This issue can also be recreated programmitcally by showing and hiding the traffic layer.

Any information on how to workaround this issue would be much appreciated.

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
257 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. IoTGirl 3,206 Reputation points Microsoft Employee
    2023-06-20T23:14:07.39+00:00

    Hi Jonathan,

    I am very sorry you were chased out of the Bing Maps forum. We, Microsoft Maps Team, do review there as well. I do see your repro for the traffic layer but it does not repro for the custom message box. Can you clarify your scenario? Is this just something you noticed or does it have deep impact?

    I have reached out to the controls team with this information and either they or I will follow up with you.

    UPDATE: I have an answer for you! The info box implementation for traffic is actually tied to the instance of the first instance of the map. Another repro you could try is to have two copies of the map control on the same page. Only the first will get the infoboxes. There is not a fast fix for this issue so the team suggests you work around the it by keeping the first instance of the map control and just hiding and reshowing it as needed.

    Sincerely,

    IoTGirl


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.