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 7520043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:59:56+00:00 2026-05-30T01:59:56+00:00

I am using gmap v3. I am facing a problem. The problem is that

  • 0

I am using gmap v3. I am facing a problem.
The problem is that I am creating dynamically marker and at similar time I am creating the infowindow of that marker.
Now I want to add some contents in any infowindow of a marker.
But don’t know how i can get the content of a infowindow.
I have stored my markers objects in a array and also infowindow’s objects.
But not found any solution.

I want to get infowindow’s content on the basis of marker.

EDIT:

var markerArray = new Array();
var infoArray = new Array();

function placemarker(point,id, contents){
var marker = new google.maps.Marker({
    icon: image,
    position: point, 
    map: map,
    title: name
});

markerArray[id] = marker;

var infoBubble = new InfoBubble();
var content = contents;
infoBubble.setContent(content);
google.maps.event.addListener(marker,"mouseover",function(event){
    for(var i=0; i < infoArray.length ; i++ )
    infoArray[i].close();
    infoBubble.open(map,marker);
});
infoArray.push(infoBubble);
}

This function is called within a function many time that create marker on map.
now on a condition two markers are at same lat long and I want to show single marker with infowindow of both markers content. I have able to create single marker but not able to append the content in a info window.

  • 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-30T01:59:57+00:00Added an answer on May 30, 2026 at 1:59 am

    If you are already keeping all the InfoWindow‘s in your infoArray, why don’t you simply store them with the same id as you do with your markers?

    var markers = {};
    var infoWindows = {};
    
    function placemarker(point, id, contents) {
        var marker = ...
        ...
        markers[id] = marker;
    
        var infoWindow = ...
        ...
        infoWindows[id] = infoWindow;
    }
    

    (Note that I have replaced your arrays with hashes.)
    Now you can access every marker’s InfoWindow (and its content via getContent()) the same way you access the marker itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to add a transparent png into google maps instead of using the
I got a trouble using GMAP V3, when I realized that I need to
I am facing problem for reading xml file using javascript. It works fine in
I'm using the jQuery GMAP 3 wrapper for the first time on a project.
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C#, I need a class called User that has a username, password, active
I am using gmap and location modules to support my content type's location. I
How to Calculate distance between two place using latitude-longitude in gmap for iPhone?

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.