none
Put either a dropdown control or radiobuttons inside the infobox

    问题

  • Hi -

    I have a map populated with pins and each pin has an infobox assosciated with it.  I have also attached an event inside the infobox, via "action" property of the infobox mentioned here .  The attached event allows the user to drw a circle around the selected property with a radius of 5 mile.  What I wasnt is to either have a dropdown or a list of radiobuttons that will allow the user to draw a circle for more than 5mile as in the list will say 5, 10, 15, etc...  Is there a way to put some sort of control inside the infobox so I can achieve this or should I just take this control out and put it on the page itself rather than putting it inside an infobox.

    Thanks in advance.

    Akash

    2012年3月6日 14:01

答案

  • You can try using htmlContent property as http://www.bingmapsportal.com/ISDK/AjaxV7#Infobox14. Try below snippet:

    map.entities.clear();
    var html = '<div id="infoboxText" style="background-color:White; border-style:solid;border-width:medium; border-color:DarkOrange; min-height:100px;width:240px;"><b id="infoboxTitle" style="position:absolute; top:10px; left:10px; width:220px;">myTitle</b><br><br><INPUT TYPE=RADIO NAME="S" VALUE="S">small<BR><INPUT TYPE=RADIO NAME="M" VALUE="M">medium<BR><INPUT TYPE=RADIO NAME="L" VALUE="L">large<P></div>';
    var infoboxOptions = {htmlContent: html};
    var defaultInfobox = new Microsoft.Maps.Infobox(map.getCenter(), infoboxOptions );   
    map.entities.push(defaultInfobox);


    MSFT
    Hemant Goyal

    • 已标记为答案 Desi Gunda 2012年3月7日 14:04
    2012年3月6日 20:45