Bingmap infobox hiding on overflow

Surya 6 Reputation points

I tried infobox sample to display the tooltip on hovering the polygons. But the tooltip is hiding when we hover the region on the edge as we can see in the second image.



Code Snippet:

infobox = new Microsoft.Maps.Infobox(center, {  
            title: 'Map Center',  
            description: 'This is the center of the map.',  
            showPointer: false,   
            showCloseButton: false,  
 visible: false,  
            actions: [{  
                label: 'Handler1',  
                eventHandler: function () {  
            }, {  
                label: 'Handler2',  
                eventHandler: function () {  

function showTooltip(e) {  
//polygon hover event  
 if ( {  
                location: e.location,  
                visible: true  

Do we have any option to adjust the tooltip position dynamically.?

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
660 questions
Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
253 questions
{count} votes

1 answer

Sort by: Most helpful
  1. rbrundritt 16,461 Reputation points Microsoft Employee

    The Bing Maps control does not reposition the infobox to keep it in view, it anchors on a consistent point on the infobox as defined by you. Azure Maps however does support allowing the infobox to automatically reposition itself to stay within the map view.

    0 comments No comments