I have multiple markers on a Google Map with a custom icon. The marker represents a number of items in that region. I have added an infobox which serves as a label of how many items are in that region.
The infobox uses the floatpane to move with the marker when the map is dragged.
The problem is that I found a comment on this question that mentions that the markers and the infoboxes are on different panes and so the infobox displays over all the markers. I would prefer it to be one the same level as its associated marker.
var labelText = '<div style="color: #000000"><b>'+ someTitle +'</b></div>';
var myOptions = {
content: labelText,
boxStyle: {
textAlign: "center",
fontSize: "8pt",
width: "90px"
},
disableAutoPan: false,
pixelOffset: new google.maps.Size(-45, someOffsetY),
position: calculatedCenterPosition,
closeBoxURL: "",
isHidden: false,
enableEventPropagation: true,
pane: "floatPane"
};
var label = new InfoBox(myOptions);
label.open(map, gmarker);
Has anyone dealt with this issue yet? How can it be solved?