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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:59:19+00:00 2026-05-29T17:59:19+00:00

I have a present need to display a Google Map, inside a FancyBox. The

  • 0

I have a present need to display a Google Map, inside a FancyBox. The tutorial shows how to do this in a straight-forward manner by using a “fancybox.iframe” CSS class, But I’ll need my FancyBox to display more than just the map, ie. a form below.

So far, here’s my code(very simple):

HTML

<div id="fancybox-container"></div>

CSS

#fancybox-container {
  display: none;
  width: 450px;
  height: 500px;
  border: 1px solid red;
  padding: 3px;
  overflow: hidden;
}

and finally some CoffeeScript:

$ ->
  new FancyMap()

class FancyMap
  constructor: ->
    @openMap() #once fancybox is open proceed to render the map inside of it
    options =
      center: new google.maps.LatLng(6.191556, -75.579716)
      zoom: 14
      mapTypeId: google.maps.MapTypeId.ROADMAP
    @map = new google.maps.Map $('#fancybox-container')[0], options

  openMap: ->
    $('a[href=#fancybox-container]').fancybox
      maxWidth: 500
      maxHeight: 550
      fitToView: false
      autoSize: true
      closeClick: false
      openEffect: 'none'
      closeEffect: 'none'

window.FancyMap = FancyMap

The result of that, is almost what I want except that the rendering is messed up,

fancybox+googlemaps

If I Drag the map inside, the result is.. something like this:

fancyboxdragged

so, in conclusion, I’m certainly missing an important property or configuration, right? Can you help me solve this issue?

Infinite Thanks in advance,

Note. I have read and tried the similar Questions here, but I’m still unsuccessful. So I reduced my issue here to its simplest version.

  • 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-29T17:59:19+00:00Added an answer on May 29, 2026 at 5:59 pm

    Google Maps does this when it doesn’t know how big its eventually going to be, for example if you assign it to the light box before opening it the map wont know what size it needs to be.

    Rather than adding the map in the constructor try adding it to the callback which will fire when the box has opened.

    Code example provided by “mu is too short”
    http://goo.gl/t7SOm

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

Sidebar

Related Questions

User is a model. I have 100 users. I need to present the list
I have a page in my wp7 application which need to display an image
I have several questions regarding the Google Map V3 API and its library for
I have a model that I am using to present an index of a
I've just started using jQuery, and can't get my head around this. I need
We have a program that displays map data (think Google Maps, but with much
I have a need to present a user with various editing options when they
I have to present some 'process' or 'flow' of the application at work on
At present we have a denormalised database. ie Name|NameID|EmployeeID|EmployeeType I'm normalising the database to
I've noticed that a few Wordpress blogs have query statistics present in their footer

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.