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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:37:38+00:00 2026-06-16T01:37:38+00:00

I am using the InfoWindow domready event handler to modify the look and feel

  • 0

I am using the InfoWindow domready event handler to modify the look and feel of the InfoWindow.

google.maps.event.addListener(popup, 'domready', function() {

I am changing the height of some of the inner divs of the InfoWindow using jquery.

The problem is the height changes and immediately resets back to default size. Also, the event handler is called twice.

Not all of the divs reset their size, only some do.

Part of my code:

popup = new google.maps.InfoWindow({
    content:'<image id="pin_' + pin_count + '" src="question.png"/>'
});

// Parent.Parent.Parent
e = $('#pin_' + pin_count).parent().parent().parent();
console.log(e.height());
h = parseFloat(e.height());
e.css({
    'position' : 'absolute',
    'top' : '-100px',
    'height' : (h + 100) + 'px',
    'border-radius' : '16px 16px 16px 16px',
    'border' : '2px solid red',
});
console.log(e.height());
console.log("...");

Is there any other events other than domready I can use, which lets me modify the InfoWindow after it is fully drawn?

  • 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-06-16T01:37:39+00:00Added an answer on June 16, 2026 at 1:37 am

    I got a way out… what is happening is whenever a InfoWindow is added to a Map, all the tiles are redrawn and along with it all the InfoWindow markers are reset too.

    So, I tried with

    google.maps.event.addListener(map, 'tilesloaded', function() {
    

    It keeps my changes, but I came across a different issue.

    This will be invoked whenever anything happens on the map, like drag, zoom etc. I will have to keep flags for each marker and execute this only if the marker is being loaded.

    Is there anyway to wait for two events to happen together?

    Update:

    I am setting a flag when I get domready event. When I get the next tilesloaded, I check for the flag and resize my InfoWindow. It is working. But again an issue.

    If I add one more marker at the same coordinates, tiles are not reloaded and tilesloaded event is not generated.

    One more question, can I get all the events in the map into a single handler?

    Update 2

    I found the issue. The div which is the third parent of the actual InfoWindow content is the only element whose size is reset.

    So, I am checking the height of div when I get tilesloaded event, if it has been reset, then I set the height again…

    google.maps.event.addListener(map, 'tilesloaded', function() {
        e = $('#pin_' + pin_count).parent().parent().parent();
        // default height is saved before the div is resized in domready event handler
        if (e.css("height") < default_height) {
            h = parseFloat(e.height());
            e.css({
                'height' : (h + 100) + 'px',
            });
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I am using InfoWindow to get custom popup on google maps, but I
I am using google maps and the infowindow that opens on the click of
I'm using the google maps API with GWT to create a tabbed infowindow with
I'm using google maps javascript API, I want to create a small InfoWindow with
I was using the technique described here Click event in Google Map InfoWindow not
I have the following JS using the Google Maps API: // initialize variables var
I'm using Google Maps in my Flex site to create a map. I've got
NOTE: I'm using v3 of the Google Maps API I'm trying to add an
I am using Google maps JavaScript API. Here is code : <!DOCTYPE html PUBLIC
In Google Maps v3, I can't seem to get my infoWindow to a width

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.