javascript - Bing Maps infobox with htmlcontent doesn't show close button -
this part of javascript code use:
infobox.setlocation(e.target.getlocation()); infobox.sethtmlcontent(myhtmlcontent); infobox.setoptions({ showpointer: false, showclosebutton: true, offset: new microsoft.maps.point(0, 25), visible: true });
is possible 'showclosebutton' option doesn't work when using sethtmlcontent? or missing something?
update: adding code manually i'm able close infobox, i'm not sure if correct way close infobox:
'<a class="infobox-close" href="javascript:closeinfobox()">x</a>'
and javascript function:
function closeinfobox() { infobox.setoptions({ visible: false }); }
the show close button when using default infobox template. when use custom html functionality overridden. approach of using link calls javascript close infobox correct approach take.