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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:35:12+00:00 2026-06-07T08:35:12+00:00

hi i have a problem with google map loading in hidden fancybox my example:

  • 0

hi i have a problem with google map loading in hidden fancybox

enter image description here

my example: gidzior.net/fancyMap was written based on this thread stackoverflow.com/questions/10890948/jquery-fancybox-with-google-maps

what can i do to fix this ??

this is my code:

<body style="padding: 20px;">
    <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
    <header>
        <a id="inline" href="#inline1" >show map</a>
    </header>
    <div role="main">
        <div id="inline1" style="width:800px; height: 350px; display: none;">
            <div id="map_canvas" style="width: 100%; height: 100%"></div>
        </div>
    </div>


    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>

    <script src="js/plugins.js"></script>
    <script src="js/libs/jquery.fancybox.pack.js"></script>
    <script src="js/libs/jquery.mousewheel-3.0.6.pack.js"></script>
    <script src="js/script.js"></script>

    <script type="text/javascript">
    var map="";
    $(document).ready(function(){
     $("a#inline").fancybox({
      'hideOnContentClick': false, // so you can handle the map
      'overlayColor'      : '#ccffee',
      'overlayOpacity'    : 0.2,
      'autoDimensions': true, // the selector #mapcontainer HAS css width and height
      'onComplete': function(){
        google.maps.event.trigger(map, "resize");
      },
      'onCleanup': function() {
       var myContent = this.href;
       $(myContent).unwrap();
      } // fixes inline bug
     });
     // map
     map = new google.maps.Map(
      document.getElementById("map_canvas"), {
      zoom: 9,
      center: new google.maps.LatLng(49.261226,-123.113928),
      mapTypeId: google.maps.MapTypeId.TERRAIN
      }   
     );
    }); // ready
</script>
</body>
  • 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-07T08:35:13+00:00Added an answer on June 7, 2026 at 8:35 am

    There is no onComplete in fancyBox V2 anymore, it’s called afterLoad now.

    But you better use afterShow , it fires a little bit later.

    http://fancyapps.com/fancybox/#docs

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

Sidebar

Related Questions

I have problem with google map Loading and making center in my java script
I have a problem loading google map. In my head section I have the
I have the following problem. I have embedded a map using Google Maps' API.
I am facing one problem ,that when the google map is loading then there
I have a problem with a Javascript request to the Google Map Api Web
I have a problem about google map. I did an app about include google
I have problem optimizing drawing Google-like map. It works OK for hundreds of points,
I have some problem to get lat/lng from google map in my application. When
I have a Google Map that won't show up. The Problem seems to be
I am having a problem with the Google map API v3, I have created

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.