Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7003327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:03:16+00:00 2026-05-27T21:03:16+00:00

i am using google maps api v3, and the InfoBubbles plugin. I am trying

  • 0

i am using google maps api v3, and the InfoBubbles plugin. I am trying to populate the map with multiple markers. Each marker has a InfoBubble that opens when clicked. These InfoBubbless have tabs (up to 3 tabs) each with their own content and html.

How can i get the markers to show on the maps with their tabs and infobubbles.

I am currently setting the infobubbles and markers to arrays and using a public function to handle the click, while passing the index.

        infoBubbles[i] = new InfoBubble({ 
            map: map, 
            minHeight: point[i].min_height,
            maxHeight: point[i].max_height,
            minWidth: point[i].min_width,
            maxWidth: point[i].max_width,
            disableAutoPan: false, 
            hideCloseButton: false, 
            arrowPosition: 30, 
            padding:12
        }); 
        google.maps.event.addListener(marker, 'click', handleMarkerClick(marker, i)); 

and the marker click function:

function handleMarkerClick(marker,index) { 
    return function() { 
        if (!infoBubbles[index].isOpen()) { 
            infoBubbles[index].open(map, marker); 
        }else{
            infoBubbles[index].close(map, marker); 
        }
    } 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:03:17+00:00Added an answer on May 27, 2026 at 9:03 pm

    i answered my own question by using the same method above. I received word back from several others that this is the correct way.

    i use the following code to define a single infoBubble and i just remove all the tabs, content and reposition/reflow the content for that bubble.

    /**
     * add a listener for the click of a marker
     * when the marker is clicked, get the current amount
     * of tabs, and remove each tab. Then reset the width/heights
     * and readd the new tabs with their content.
     * @return {[type]}
     */
    google.maps.event.addListener(marker, 'click', function(){
    
        /** remove all of the tabs from the infobubble, early prototype */
        if (tabCount > 0){
            for (var i = 0; i < tabCount; i++){
                infoBubble.removeTab(0);
            }   
            tabCount = 0;   
        }
    
        /** setup the min/max width and heights for the bubble */
        infoBubble.setMinWidth(this.infoBubble_minWidth);
        infoBubble.setMaxWidth(this.infoBubble_maxWidth);
        infoBubble.setMinHeight(this.infoBubble_minHeight);
        infoBubble.setMaxHeight(this.infoBubble_maxHeight);
    
        var tabs = this.infoBubble_tabs;
    
        /** @type {Number} set the counter to 1, since tab index starts at 1 */
        for (var ii = 0; ii < tabs.length; ii++) {
            infoBubble.addTab(tabs[ii].tabTitle, tabs[ii].tabContent);
            /** count the amount of tabs there are */
            tabCount++;
        }
        /** open the infoBubble */
        infoBubble.open(map, this);
    });  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a map with multiple markers of companies using google maps API v3.
I'm using the Google Maps API v2. I add markers to the map and
I'm using the Google Maps API to build a map full of markers, but
In Google Maps API v2, I was using map.clearOverlays() to remove the marker and
I am using google maps api to place markers on a map. The gps
I'm trying to create dynamic markers using google maps api and am having problems
I'm using Google Maps API to display a map and some markers on it.
I just started working using Google Maps API yesterday, and trying to set up
I'm building a simple appliacation using the Google Maps API and I'm trying to
I am using Google Maps API to display a map on a certain page.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.