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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:17:33+00:00 2026-05-28T15:17:33+00:00

The user has markers loaded depending on where they select their location. The markers

  • 0

The user has markers loaded depending on where they select their location. The markers are cleared when a new location is chosen. If I have an InfoWindow open when I clear the markers, it stays open even though the marker goes away. I want any open InfoWindow to close when the data is refreshed.

My implementation details:

I am using jquery-ui-map to enhance my Google Maps implementation with jQuery.

I attach a click event when creating the markers with the following code (FYI: I took out all the specific details and replaced them with generic ones).

$('#map-canvas').gmap('addMarker', {
    'position' : new google.maps.LatLng(latitude, longitude),
    'title' : myTitle,
    'icon' : myImage,
    'shadow' : myShadowImage
}).click(function() {
    $('#map-canvas').gmap('openInfoWindow', {
        'content' : displayContent(myObject)
    }, this);
});

The option openInfoWindow does not return anything, so storing the InfoWindow object in an array to close it later does not look like a viable option.

Does anyone know how to achieve this using the jquery-ui-map library? I don’t see a closeInfoWindow listed in the API documentation.

  • 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-28T15:17:34+00:00Added an answer on May 28, 2026 at 3:17 pm

    jquery-ui-map v.beta

    var theInfoWindowObject = $('#map_canvas').gmap('get', 'iw');
    theInfoWindowObject.close();
    

    jquery-ui-map v rc 1

    $('#map_canvas').gmap('closeInfoWindow');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

User has my app open. They hit the home button, resulting in my app
I have a map that has checkboxes for users to select what they would
A user has sent me some information that they posted to one of my
Once a user has selected a file with the open file dialog, how can
When a user has several Firefox extensions, what decides the order in which they
If a user has signed into their computer and are connected to an intranet,
I have a rails application where each user has a separate database. (taking Joel
I have a mapview where I want to track the user's current location. GPS
I have a Google Map on our site that has a list of markers
User has pets , pets may have pictures One picture may be set as

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.