Google maps api v3 + infoBubble in markerClusterer

I tried to add infoBubble in markCluster to the clusterclick event, but the infoBubble.Open method requests the "marker" parameter for binding. The problem is that markerCluster is not google.maps.Point, so it is not possible to bind infoBubble to it.

I assigned a Cluster marker for infoBubble, but infoBubble redraws in a new position, moving the marker from its place.

Has anyone had the same problem? Is there a solution without modifying the infoBubble source code?

http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/

+5
source share
2 answers

1: . , .

:

infoBubble.setPossition(latLng);
infoBubble.open(map);

:

infoBubble.open(map, marker);

2: , ??

2:

InfoBubble, offsetParameter, draw:

InfoBubble.prototype.PIXEL_OFFSET = 0
...
var top = pos.y - (height + arrowSize); if (anchorHeight) { top -= anchorHeight; } top -= this.PIXEL_OFFSET

-

+6

93 ( )

if (options['pixelOffset'] == undefined) {
    options['pixelOffset'] = this.PIXEL_OFFSET_;
}

182,

InfoBubble.prototype.PIXEL_OFFSET_ = [0.0];

908 :

top -= this.get('pixelOffset')[1];  // Add offset Y.
left -= this.get('pixelOffset')[0]; // Add offset X.

:

this.bubble_.style['top'] = this.px(top);
this.bubble_.style['left'] = this.px(left);

var popupWindowOptions = {
    backgroundColor: '#2B2B2B',
    arrowStyle: 0,
    pixelOffset: [0,16]
 };

 this.popupWindow = new InfoBubble(popupWindowOptions);
+1

All Articles