Azure map control web sdk issue with chromium browsers

Kunta Paliwal 25 Reputation points
2023-10-05T06:51:28.56+00:00

Azure map control web sdk behaving different on different resolution of browsers, works fine on firefox but in chromium based( chrome, edge, brave) its not working fine. It also varying on machine resolution and browser resolution combination. Works fine on certain combinations and not on some other combinations Attached HAr files and step recorder files for chrome and firefox browsers. Seems to be an issue with sdk once zoom in zoom out happens on browser.

User's image

User's image

User's image

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
832 questions
{count} votes

Accepted answer
  1. rbrundritt 20,836 Reputation points Microsoft Employee Moderator
    2023-10-12T14:56:24.9466667+00:00

    Extracting the answer from the comment discussion.

    The issue in this case is that when the browser zoom changed, the map canvas wasn't resizing as it didn't detect the size change. This resulted in white bars on the sides of the map and mouse events not working correctly (click points were not over the pins). In this case manually calling the maps resize function after the browser zoom has changed resolved the issue. The code used was:

    window.addEventListener('resize', () => {
    setTimeout(() =>{
      this.map.resize();
    },100);
    });
    
    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.