javascript - InfoBubble open specific tab -
in javascript, found neat little plugin google maps api v3, called infobubble. great job @ making easy have highly customized info windows. can't seem find in there though how open specific tab through function call , not click on tab button. tried settabactive(index) 1 of functions of plugin doesn't seem work. missing obvious or more digging right function in js file?
for reference, here's code:
var center = new google.maps.latlng(//...getting lat/lng coords... var bubble = new infobubble( { map: mothermap, position: center, minheight: 250, maxheight: 250, minwidth: 250, maxwidth: 250, tabclassname: "contenttab", padding: 3 }); //...creating tabs, getting tab should opened, setting value of tabtoshow , on... //at point i've checked console.out() , tabtoshow number 0-2 bubble.settabactive(tabtoshow); even code, first tab opened every time. thoughts appreciated.
edit: fixed problem myself right after posting here... after looking @ code closer noticed author, whatever reason, uses numbering beginning @ 1 instead of 0. it's nice plugin needs documentation...
make sure tab open (you can check isopen() method).
if want, can modify infobubble.prototype.open open specific tab:
window.settimeout(function() { that.open_(opt_map, opt_anchor); that.settabactive(_defaulttab); }, 0);
Comments
Post a Comment