none
In Bing V7 InfoBox does not work until you zoom in or out on the map. RRS feed

  • Question

  • It appears that something is broke in Bing V7 because when you add a push pin and an infobox to the map and add mouseover event handlers the infoboix does not appear when doing a mouse over on the push pin.

    If you zoom the map out one level the infobox suddenly starts appearing and worls thereafter.

    I'm pretty sure this used to work ok and as soon as you added the pushpin and info box it would work with a mouse over event handler butn now it's broke.


    Steve Kahler
    • Moved by Ricky_Brundritt Friday, March 9, 2012 5:29 PM (From:Bing Maps: Map Control and Web services Development)
    Tuesday, May 10, 2011 6:29 PM

Answers

All replies

  • I found a workaround for this.   I'm using setView to zoom the map out one level and then back in again.   I do this after adding each push pin.   It's a pain but it works and my infoBoxes are now appearing right away.
    Steve Kahler
    Tuesday, May 10, 2011 7:20 PM
  • Works for me. Could you try adding below snippet in text box showing code http://www.bingmapsportal.com/ISDK/AjaxV7 & click RUN button.

    map.entities.clear();
    var pushpin= new Microsoft.Maps.Pushpin(map.getCenter(), null);
    pushpinOver= Microsoft.Maps.Events.addHandler(pushpin, 'mouseover', function() { var defaultInfobox = new Microsoft.Maps.Infobox(map.getCenter(), null );   
    map.entities.push(defaultInfobox); } ); 
    map.entities.push(pushpin);

    it works for me, on mousehover i get infobox. Let me know browser you are geting? if you are using htmlcontent in options, try using sethtmloptions, found a bug in htmlcontent option lately.


    HemantGoyal
    Tuesday, May 10, 2011 7:36 PM
  • I am using htmlContent.

    Where is sethtmloptions documented ?   I don't recall seeing that in the documentation anywhere.

     


    Steve Kahler
    Tuesday, May 10, 2011 7:38 PM
  • my bad. I meant setHtmlContent

    http://msdn.microsoft.com/en-us/library/gg675208.aspx


    HemantGoyal
    Tuesday, May 10, 2011 11:17 PM