Worked For Me !!! thanks Oscar Wilde

On Wednesday, 26 January 2011 15:13:33 UTC+5:30, OscarWilde wrote:
>
> I found a solution! Here is what I did: 
>
> I've created an Array with the infoBubble Objects and created a 
> function in the global namespce to open the correct infoBubble. 
>
>         infoBubbles[i] = new InfoBubble({ 
>           map: map, 
>           content: '<div style="padding-right: 16px;">' + html + '</ 
> div>', 
>           shadowStyle: 1, 
>           padding: 5, 
>           backgroundColor: 'rgb(169,218,88)', 
>           borderRadius: 6, 
>           arrowSize: 10, 
>           borderWidth: 1, 
>           maxWidth: 220, 
>           borderColor: '#2c2c2c', 
>           disableAutoPan: false, 
>           hideCloseButton: false, 
>           arrowPosition: 30, 
>           backgroundClassName: '', 
>           arrowStyle: 0 
>         }); 
>
>         google.maps.event.addListener(marker, 'click', 
> handleMarkerClick(marker, i)); 
>
> And here is the function: 
>
> function handleMarkerClick(marker,index) { 
>         return function() { 
>           if (!infoBubbles[index].isOpen()) { 
>           infoBubbles[index].open(map, marker); 
>     } 
>   } 
> }

-- 
You received this message because you are subscribed to the Google Groups 
"[deprecated] Google Maps JavaScript API v3. Please use the latest post." group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-maps-js-api-v3+unsubscr...@googlegroups.com.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
Visit this group at https://groups.google.com/group/google-maps-js-api-v3.
For more options, visit https://groups.google.com/d/optout.

Reply via email to