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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:12:48+00:00 2026-06-16T07:12:48+00:00

UPDATE I’ve tried implementing wf’s solution, but the error still persists. You can take

  • 0

UPDATE
I’ve tried implementing wf’s solution, but the error still persists. You can take a look at a live example here –>
http://www.opohills.com/taipei-rentals/apollo_a.php

Scroll down and click the “Locations” tab

I’m trying to load google maps inside bootstrap tabs. I’m encountering the same problem discussed here, and extensively at SA —

https://github.com/twitter/bootstrap/issues/2330


The fix is to add a callback when the tab is clicked, to load the map than. I’m trying to implement this, with no success. The error still persists ( when only 1/8th of the map shows on the top left hand corner. ) When I open up inspect element, the map fills up and works fine (I’m guessing because inspect element is rereading the javascript)

Below is my javascript, and since this is my first real forray into it, I’m sure I’m doing something wrong —

  <script type="text/javascript">

    var map,
        marker = new google.maps.Marker({
                   position: new google.maps.LatLng(25.041483, 121.553984),
                   draggable: true,
                   title: 'Opo Apartment' }),
        infoWindow = new google.maps.InfoWindow({content: 'Apollo Apartment'});

        $('#location').on('show', function(e) {
          if( map == undefined) {  

            map =    new google.maps.Map(
                     document.getElementById('map-canvas'), 
                      { zoom: 14,
                        center: new google.maps.LatLng(25.041483, 121.553984),
                        mapTypeId: google.maps.MapTypeId.ROADMAP })
          }
          marker.setMap(map);
          infoWindow.open(map, marker);
        })

  </script>​

What are your thoughts on this?

  • 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-16T07:12:49+00:00Added an answer on June 16, 2026 at 7:12 am

    I made a fix around it, but keeping it in a different div, away from the tabs, and displaying it when a certain tab is clicked. You can go to the same site to see the code

    $(document).ready(function(){
    
      var map,
          marker = new google.maps.Marker({
                     position: new google.maps.LatLng(25.041483, 121.553984),
                     draggable: true,
                     title: 'Opo Apartment' }),
          infoWindow = new google.maps.InfoWindow({content: 'Apollo Apartment'});
    
    
    
      $('#location').on('show', function(e) {
        if( map == undefined) {  
    
          map =    new google.maps.Map(
                   document.getElementById('map-canvas'), 
                    { zoom: 14,
                      center: new google.maps.LatLng(25.041483, 121.553984),
                      mapTypeId: google.maps.MapTypeId.ROADMAP })
        }
        document.getElementById("largemap").style.display="block";
    
        google.maps.event.trigger(map, 'resize');
                marker.setMap(map);
        infoWindow.open(map, marker);
      })
      $('.tabclick').on('show', function(e) {
        document.getElementById("largemap").style.display="none";
    
      })
    
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: I'm getting this error: (No route matches /docs/index.html... ) when accessing admin.example.com/docs/index.html The
Update : I edited the code, but the problem persists... Hi everyone, this is
Update: Tried November CTP release. Same error message. Forgot to mention that this server
UPDATE data from db to user to db through an input field. Can anyone
Update: The index.php file here: /public_html/d/index.php includes: /public_html/d/core/source/class.File1.php This Class.File1.php here has this include
UPDATE: I now have a solution I'm much happier with that, whilst not solving
UPDATE users SET field = my_sp() in SQL Server 2005. Apparently I can't do
Update There is no ready XML parser in Java community which can do NIO
Update: Edited code example to use AutoA for the workaround (which was the original
UPDATE: I've decided to take the advice below and implement a Memcached tier in

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.