Search code examples
bing-mapsbing-apiinfobox

Infobox in Bing V8 maps get cropped when pushpin is near map boundary


I am displaying map infobox when I click on a pushpin in Bing V8 maps. The infobox moves out of the map boundary(cropped) when pushpin is near edges of map boundary. Is there any inherent way of solving it or we have to perform the tedious task of repositioning infobox or the map itself in order to show complete infobox.


Solution

  • There are two options:

    • Move the map when a user clicks on the pushpin and then display the infobox, often users will center the map on the clicked pushpin (ideal for mobile solutions).
    • When loading the map, add the following map option; allowInfoboxOverflow: true This will allow the infobox to appear outside the map edges and overflow. This is better suited in non-mobile apps.