I want to change the text size of a label which I have created by InfoBox in google maps. It is affecting the text but not text size. Here, what I have tried so far:
function addLabel(text,a,fontSize){
fontSz = fontSize + "pt";
var myOptions = {
content: text
,boxStyle: {
border: "0px solid black "
,textAlign: "center"
,fontSize: fontSz
,width: "50px"
}
,disableAutoPan: true
,pixelOffset: new google.maps.Size(-25, 0)
,position: a
,closeBoxURL: ""
,isHidden: false
,pane: "mapPane"
,enableEventPropagation: true
};
var ibLabel = new InfoBox(myOptions);
ibLabel.open(map);
return ibLabel;
}
Here I call it inside a function..
if(label.length > 0){
for( var j=0;j<xx.length;j++){
label[j].setVisible(vis);
}
}else{
for( var j=0;j< xx.length;j++){
alert(map.getZoom()+5);
label[j] = addLabel(j+radars[j][1],new google.maps.LatLng(xx[j][2], xx[j][3]), map.getZoom()+5);
}
}
But the font size is not changing dynamically, Can somebody please help me?