Map V3 is not rendered completely in fancybox.

473 views
Skip to first unread message

Cyril Sanjay

unread,
Feb 25, 2010, 9:08:23 AM2/25/10
to Google Maps JavaScript API v3
Hi,
The V2 Map is working fine with fancybox, but not V3.
The map is not rendered 100%, but after some interactions it is
working fine.

In fancbox, I am using the inline method and loading the Html part.

var directionDisplay;
var directionsService = new google.maps.DirectionsService();

function intilazeMap(lattitude,longitude)
{
var latlng = new google.maps.LatLng(lattitude, longitude);
var myOptions = {
zoom: 16,
scrollwheel: false,
center: latlng,
disableDefaultUI: true,
navigationControl: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};

var mapDir = new
google.maps.Map(document.getElementById("map_canvas_direction"),
myOptions);
}

I googled and found that it worked ( I dint try it ) in iFrame method
of fancybox.

Please help.

Regards,
~Cyril

Marcelo

unread,
Feb 25, 2010, 11:03:30 AM2/25/10
to Google Maps JavaScript API v3
On Feb 25, 3:08 pm, Cyril Sanjay <cyril.san...@gmail.com> wrote:
>
> Please help.
>

How?

Either get rid of the fancy plugin or read and follow the group's
posting guidelines:
http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/2b3f101fd509919e#
http://groups.google.com/group/Google-Maps-API/web/why-including-a-link-is-critical

--
Marcelo - http://maps.forum.nu
--


> Regards,
> ~Cyril

Cyril Sanjay

unread,
Feb 26, 2010, 5:29:02 AM2/26/10
to Google Maps JavaScript API v3
Is there a way to setup the size of gmap like in gmap V2.
ex: var map = new GMap2(document.getElementById("map_canvas"),{ size:
new GSize(254, 314) });

You can check it here:
http://testcy.mayavaram.com/fancy.html

Thanks
~Cyril

On Feb 25, 9:03 pm, Marcelo <marcelo...@hotmail.com> wrote:
> On Feb 25, 3:08 pm, Cyril Sanjay <cyril.san...@gmail.com> wrote:
>
>
>
> > Please help.
>
> How?
>
> Either get rid of the fancy plugin or read and follow the group's

> posting guidelines:http://groups.google.com/group/google-maps-js-api-v3/browse_thread/th...http://groups.google.com/group/Google-Maps-API/web/why-including-a-li...
>
> --
> Marcelo -http://maps.forum.nu
> --
>
>
>
> > Regards,
> > ~Cyril

Chad Killingsworth

unread,
Feb 26, 2010, 9:37:09 AM2/26/10
to Google Maps JavaScript API v3
In the V3 API, the map size is determined by the element that contains
it. So if you want a map of specific size, you'd use a div like:

<div id="map_canvas" style="width: 254px; height: 314px"><div>

Chad Killingsworth

On Feb 26, 4:29 am, Cyril Sanjay <cyril.san...@gmail.com> wrote:
> Is there a way to setup the size of gmap  like in gmap V2.
> ex:  var map = new GMap2(document.getElementById("map_canvas"),{ size:
> new GSize(254, 314) });
>
> You can check it here:http://testcy.mayavaram.com/fancy.html
>
> Thanks
> ~Cyril
>
> On Feb 25, 9:03 pm, Marcelo <marcelo...@hotmail.com> wrote:
>
> > On Feb 25, 3:08 pm, Cyril Sanjay <cyril.san...@gmail.com> wrote:
>
> > > Please help.
>
> > How?
>
> > Either get rid of the fancy plugin or read and follow the group's

> > posting guidelines:http://groups.google.com/group/google-maps-js-api-v3/browse_thread/th......

Cyril Sanjay

unread,
Mar 2, 2010, 1:51:28 AM3/2/10
to Google Maps JavaScript API v3
I have done the same but no responce.
Anything else is missing for the map to render completely.

Thanks,
~Cyril

On Feb 26, 7:37 pm, Chad Killingsworth

akkad

unread,
Mar 23, 2010, 1:04:18 AM3/23/10
to Google Maps JavaScript API v3
i have a none clean solution but may be it will solve your problem,
rather than set the container which holds the fancybox div (with id of
mapdir in your case)
with "display:none", instead remove "display:none" make it "height:
0px;overflow:hidden;",
so as in your html, replace this:
<div style="display: none;">
<div id="mapdir">

with this:

<div style="height:0px;overflow:hidden;">
<div id="mapdir">


I hope it help.

Reply all
Reply to author
Forward
0 new messages