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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:00:17+00:00 2026-06-05T14:00:17+00:00

I use GoMap jQuery plugin for Google map. The div with the map is

  • 0

I use GoMap jQuery plugin for Google map. The div with the map is hidden by default. I almost figured how to display the map correctly, but somehow I’m unable to center the map after I reveal the div. I tried every solution I was able to find, right now I have the code below, which still doesn’t work right. Anyone could help me with this? Thanks.

<h3><a class="showmap" href="#">Show map</a></h3>
<div id="map" style="height: 350px; width: 700px;"> </div>

<script type="text/javascript">
$(function() { 
$("#map").goMap({
markers: [{  
        latitude: 49.676196, 
        longitude: 13.444927, 
        html: { 
            content: 'Marker description', 
            popup: true 
        } 
    }], 
    hideByClick: false,
    zoom: 12
}); 
});

$(document).ready(function(){
    $("#map").hide();
});

$('.showmap').click(function(){
 $('#map').slideToggle('slow', function() {
  var center = $.goMap.map.getCenter();      
  google.maps.event.trigger($.goMap.map, 'resize');
  $.goMap.map.setCenter(center);
  });
});

  • 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-05T14:00:18+00:00Added an answer on June 5, 2026 at 2:00 pm

    Your solution is almost perfect, but by default the map will pan to make the infoWindow visible, what will change the center.
    You may disable the AutoPan:

    $("#map").goMap({
    markers: [{  
            latitude: 49.676196, 
            longitude: 13.444927, 
            html: { 
                content: 'Marker description', 
                popup: true ,
                disableAutoPan:true//<--
            } 
        }], 
        hideByClick: false,
        zoom: 12
    }); 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use this jquery plugin in my rails3 apps http://gmap.nurtext.de/ (Google Maps
to clear markers from google maps I use: mapContent.gmap('clear', 'markers'); But what if I
I use the google map tool from primefaces . I want my user to
I use jquery-UI-map for gmaps, and i want to make popup when i click
I am attempting to use the google visualization library - intensity map. I have
wondering if you could shed light for me please! I'm using http://jquery-ui-map.googlecode.com/svn/trunk/demos/google-maps-jquery-filtering.html and I
use a reapeter to display data, but sometimes the data is to big to
use this website a lot but first time posting. My program creates a number
I'm trying to use the GMap.NET.WindowsForms control in my Windows forms application but I
I'm working with multiple map markers. Currently I use map.fitBounds(bounds); in my JavaScript to

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.