Fancybox and Google Map

1,426 views
Skip to first unread message

atelier26

unread,
Mar 2, 2009, 9:50:40 AM3/2/09
to fancybox
Hello,

Did some of you succeeded to load Google Maps in a fancybox?

Please let me know

Paul

Janis

unread,
Mar 2, 2009, 11:39:21 AM3/2/09
to fancybox
Hi,
I haven`t tried.

Janis

atelier26

unread,
Mar 3, 2009, 2:34:07 AM3/3/09
to fancybox
Well I did. The map loads in the iframe mode, but there is a problem
with the position of the map.

It does work well in Safari on a Mac, but it fails in Firefox and IE.

Paul

Janis

unread,
Mar 3, 2009, 2:51:24 AM3/3/09
to fancybox
Could you show example page?

atelier26

unread,
Mar 4, 2009, 8:46:31 AM3/4/09
to fancybox
Here is the page.

It works OK only in Safari 3 and 4beta. Any other website will load
the map but it won't be shown correctly.

http://www.pensionmaria.eu/contact.html

Hope you can help.

Paul


On Mar 3, 9:51 am, Janis <janis.skarne...@gmail.com> wrote:
> Could you show example page?

atelier26

unread,
Mar 4, 2009, 8:48:53 AM3/4/09
to fancybox
I forgot to mention :)

The FancyBox with the map should be loaded when pressing the Map
button (last option on the blue bar).

Paul

a.l...@talkwebsolutions.co.uk

unread,
Mar 5, 2009, 9:43:19 AM3/5/09
to fancybox
Paul,

I have the exact same problem, running the page directly works fine,
the map is positioned great. But then calling it through FancyBox
throws it off, although it's only a problem when i have more than one
point on the map, just one works fine, more than one and it doesn't
focus.



Alex

a.l...@talkwebsolutions.co.uk

unread,
Mar 5, 2009, 9:58:55 AM3/5/09
to fancybox
Paul,

I have the exact same problem, running the page directly works fine,
the map is positioned great. But then calling it through FancyBox
throws it off, although it's only a problem when i have more than one
point on the map, just one works fine, more than one and it doesn't
focus.



Alex


On Mar 4, 1:48 pm, atelier26 <paul.bo...@gmail.com> wrote:

andyewebb

unread,
Mar 5, 2009, 6:42:49 PM3/5/09
to fancybox
Guys

I had the same issue, as all my code is dynamically built up. At the
point where i was setting the lat/long of the map centre, i just added
2 to the lat/long values, this adjusted the position of the map so it
was centered, bit of a hack but it works, then just did a browser
check to decide weather to add the values.

hope this helps.

On Mar 5, 2:58 pm, "a.ll...@talkwebsolutions.co.uk"

atelier26

unread,
Mar 5, 2009, 7:39:44 PM3/5/09
to fancybox
Well thanks for the help. Haven't tried yet but I am curious how did
you came with this solution. Is that documented somewhere? Or was by
trial and error.

Paul

atelier26

unread,
Mar 5, 2009, 7:43:03 PM3/5/09
to fancybox
I would be happy if the map would work fine only with one point,
because I only have one point.

Do you use the same v2 map or is a different Google map script?

Please let me know.

Best wishes,
Paul


On Mar 5, 4:58 pm, "a.ll...@talkwebsolutions.co.uk"
Message has been deleted

atelier26

unread,
Mar 7, 2009, 12:06:19 AM3/7/09
to fancybox
Thanks. Than I look forward to visit the website when it will be
released.

Best wishes,
Paul

On Mar 6, 10:24 am, andyewebb <andyew...@gmail.com> wrote:
> No i just worked it out, it was a problem that i had been putting off,
> but due to my website nearlly being finished sore this thread and
> decided to have a look into it.
>
> What i worked out was when  i set the map to centre with the lat long
> of my point it would actully not centre, but it would put my point at
> the top left hand corner
>
> and yes i am using the version 2 of the scripts. i will put a link up
> to my site in a few days when i get it relealeased.
>
> Regards

guilherme ioppe

unread,
Mar 26, 2009, 7:39:36 PM3/26/09
to fancybox
Hi,

I don't know which solution you guys used, but I did that and works
well for IE6, IE7, FF, Safari (MAC/PC).
This is the site I used http://www.mixscapacetes.com.br/contato.asp

Thanks,
Guilherme Ioppe

westondweb

unread,
Apr 2, 2009, 9:01:53 AM4/2/09
to fancybox
Hey guys im having the same issue. But the above solution says to add
2. Add 2 to what? Which method am i adding 2 to? I've tried simply
adding 2 to the lat and long, but that puts me halfway around the
planet :).

Thanks

On Mar 26, 7:39 pm, guilherme ioppe <guilhermeio...@gmail.com> wrote:
> Hi,
>
> I don't know which solution you guys used, but I did that and works
> well for IE6, IE7, FF, Safari (MAC/PC).
> This is the site I usedhttp://www.mixscapacetes.com.br/contato.asp
>
> Thanks,
> Guilherme Ioppe
>
> On Mar 7, 2:06 am, atelier26 <paul.bo...@gmail.com> wrote:
>
> > Thanks. Than I look forward to visit the website when it will be
> > released.
>
> > Best wishes,
> > Paul
>
> > On Mar 6, 10:24 am, andyewebb <andyew...@gmail.com> wrote:
>
> > > No i just worked it out, it was a problem that i had been putting off,
> > > but due to my website nearlly being finished sore this thread and
> > > decided to have a look into it.
>
> > > What i worked out was when  i set the map to centre with the lat long
> > > of my point it would actully not centre, but it would put my point at
> > > the top left hand corner
>
> > > and yes i am using the version 2 of the scripts. i will put a link up
> > > to my site in a few days when i get it relealeased.
>
> > > Regards
>
> > > On Mar 6, 12:43 am, atelier26 <paul.bo...@gmail.com> wrote:
>
> > > > I would be happy if the map would work fine only with one point,
> > > > because I only have one point.
>
> > > > Do you use the same v2 map or is a differentGooglemap script?

guilherme ioppe

unread,
Apr 2, 2009, 9:44:47 PM4/2/09
to fancybox
I also didn't understand that hehe...
So, you can use the same way I used here http://www.mixscapacetes.com.br/contato.asp

I didn't use the last version of fancybox, you can copy the js and the
way it works there.

Any problem, let me know.
Guilherme Ioppe

Richard Collamore

unread,
Apr 3, 2009, 12:46:55 AM4/3/09
to fanc...@googlegroups.com
Hi-

The old version of fancy box used to show "fancy_progress.png" in iframes. Any idea why this is not working now?

Thanks

guilherme ioppe

unread,
Apr 14, 2009, 6:23:52 PM4/14/09
to fancybox
I have the same doubt...



On Apr 3, 1:46 am, Richard Collamore <rcollam...@gmail.com> wrote:
> Hi-
>
> The old version of fancy box used to show "fancy_progress.png" in iframes.
> Any idea why this is not working now?
>
> Thanks
>

JFK

unread,
Apr 14, 2009, 6:46:51 PM4/14/09
to fancybox
your answer:
http://xcodetuts.com/javascript-ajax/integrating-google-maps-into-fancybox/
really works fine (i did try it)
Message has been deleted

Ragnarok

unread,
Apr 21, 2009, 5:12:36 AM4/21/09
to fancybox
it was great..but it seem not using fancybox, cause i can't find it ..
is anybody have a method to solved the center bug....

On Apr 17, 7:19 pm, andyewebb <andyew...@gmail.com> wrote:
> Hi I have just released my website which includes google maps and
> jquery working well together on multiple browsers.
>
> Have a look and let me know what you think
>
> http://www.righthorses.co.uk
>
> On 7 Mar, 06:06, atelier26 <paul.bo...@gmail.com> wrote:
>
> > Thanks. Than I look forward to visit the website when it will be
> > released.
>
> > Best wishes,
> > Paul
>
> > On Mar 6, 10:24 am, andyewebb <andyew...@gmail.com> wrote:
>
> > > No i just worked it out, it was a problem that i had been putting off,
> > > but due to my website nearlly being finished sore this thread and
> > > decided to have a look into it.
>
> > > What i worked out was when  i set themapto centre with the lat long
> > > of my point it would actully not centre, but it would put my point at
> > > the top left hand corner
>
> > > and yes i am using the version 2 of the scripts. i will put a link up
> > > to my site in a few days when i get it relealeased.
>
> > > Regards
>
> > > On Mar 6, 12:43 am, atelier26 <paul.bo...@gmail.com> wrote:
>
> > > > I would be happy if themapwould work fine only with one point,
> > > > because I only have one point.
>
> > > > Do you use the same v2mapor is a different Googlemapscript?
>
> > > > Please let me know.
>
> > > > Best wishes,
> > > > Paul
>
> > > > On Mar 5, 4:58 pm, "a.ll...@talkwebsolutions.co.uk"
>
> > > > <a.ll...@talkwebsolutions.co.uk> wrote:
> > > > > Paul,
>
> > > > > I have the exact same problem, running the page directly works fine,
> > > > > themapis positioned great. But then calling it through FancyBox
> > > > > throws it off, although it's only a problem when i have more than one
> > > > > point on themap, just one works fine, more than one and it doesn't
> > > > > focus.
>
> > > > > Alex
>
> > > > > On Mar 4, 1:48 pm, atelier26 <paul.bo...@gmail.com> wrote:
>
> > > > > > I forgot to mention :)
>
> > > > > > The FancyBox with themapshould be loaded when pressing theMap
> > > > > > button (last option on the blue bar).
>
> > > > > > Paul
>
> > > > > > On Mar 4, 3:46 pm, atelier26 <paul.bo...@gmail.com> wrote:
>
> > > > > > > Here is the page.
>
> > > > > > > It works OK only in Safari 3 and 4beta. Any other website will load
> > > > > > > themapbut it won't be shown correctly.

Ragnarok

unread,
Apr 21, 2009, 5:12:47 AM4/21/09
to fancybox
it was great..but it seem not using fancybox, cause i can't find it ..
is anybody have a method to solved the center bug....

On Apr 17, 7:19 pm, andyewebb <andyew...@gmail.com> wrote:
> Hi I have just released my website which includes google maps and
> jquery working well together on multiple browsers.
>
> Have a look and let me know what you think
>
> http://www.righthorses.co.uk
>
> On 7 Mar, 06:06, atelier26 <paul.bo...@gmail.com> wrote:
>
> > Thanks. Than I look forward to visit the website when it will be
> > released.
>
> > Best wishes,
> > Paul
>
> > On Mar 6, 10:24 am, andyewebb <andyew...@gmail.com> wrote:
>
> > > No i just worked it out, it was a problem that i had been putting off,
> > > but due to my website nearlly being finished sore this thread and
> > > decided to have a look into it.
>
> > > What i worked out was when  i set themapto centre with the lat long
> > > of my point it would actully not centre, but it would put my point at
> > > the top left hand corner
>
> > > and yes i am using the version 2 of the scripts. i will put a link up
> > > to my site in a few days when i get it relealeased.
>
> > > Regards
>
> > > On Mar 6, 12:43 am, atelier26 <paul.bo...@gmail.com> wrote:
>
> > > > I would be happy if themapwould work fine only with one point,
> > > > because I only have one point.
>
> > > > Do you use the same v2mapor is a different Googlemapscript?
>
> > > > Please let me know.
>
> > > > Best wishes,
> > > > Paul
>
> > > > On Mar 5, 4:58 pm, "a.ll...@talkwebsolutions.co.uk"
>
> > > > <a.ll...@talkwebsolutions.co.uk> wrote:
> > > > > Paul,
>
> > > > > I have the exact same problem, running the page directly works fine,
> > > > > themapis positioned great. But then calling it through FancyBox
> > > > > throws it off, although it's only a problem when i have more than one
> > > > > point on themap, just one works fine, more than one and it doesn't
> > > > > focus.
>
> > > > > Alex
>
> > > > > On Mar 4, 1:48 pm, atelier26 <paul.bo...@gmail.com> wrote:
>
> > > > > > I forgot to mention :)
>
> > > > > > The FancyBox with themapshould be loaded when pressing theMap
> > > > > > button (last option on the blue bar).
>
> > > > > > Paul
>
> > > > > > On Mar 4, 3:46 pm, atelier26 <paul.bo...@gmail.com> wrote:
>
> > > > > > > Here is the page.
>
> > > > > > > It works OK only in Safari 3 and 4beta. Any other website will load
> > > > > > > themapbut it won't be shown correctly.

JFK

unread,
Apr 21, 2009, 11:00:27 PM4/21/09
to fancybox
I think I didn't really understand the issue in my first reply. I did
dig further and found a workaround for the position problem. Check it
out at: http://jquery.diaz-cornen.com/fancybox/index_map.html

Owca

unread,
Apr 30, 2009, 4:41:06 PM4/30/09
to fancybox
I have found very simple solution:

<a class="iframe" href="url-to-website-with-map.html" rel="popup-
map">map</a>

$("a[rel^='popup']").fancybox({
'frameWidth': 500,
'frameHeight': 500
});

Part of url-to-website-with-map.html file:

<div id="googleMap"></div>

<script type="text/javascript">
var map;

window.onload = function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("googleMap"), { size:new
GSize(500,500)}); <--- the most important thing.

you have to create map and set width and height. Vuala.
Reply all
Reply to author
Forward
0 new messages