[Vuejs]-Here Maps – Reposition map, If Info Bubble in not completely visible in current window

0👍

One approach might be to centre the map on the marker whenever you click on it. This still won’t guarantee the whole infowindow will appear on the screen, depending on how big it is. But it’s likely to work in most cases.

You should be able to get the map’s centre using map.getCenter()

Using the examples given at

you should be able to do something like:

group.addEventListener('tap', function (evt) {
    var bubble = new H.ui.InfoBubble(coord, {
      // read custom data
      content: evt.target.getData(),
      position: group.getCenter()
    });
    // show info bubble
    ui.addBubble(bubble);
}, false);

Leave a comment