Sorry for not replying for such a long time, and many thanks for the
advices.
I was adding the parent div earlier to the page, bud upon reload, the
timing was so fast that in fact  the div was not added, so that was
indeed the problem. Now everything works great. Many thanks again.

On Oct 11, 11:43 am, Marc <[email protected]> wrote:
> If you can publish a link to the faulty page, it would help.
> Generally, the graymapis caused by:
>
> 1. The DIV used for themapwas not added to the DOM when themapwas
> created.
> For example, this code fails:
>
> var div = document.createElement("div") ;
> varmap= newgoogle.maps.Map(div, {
>     zoom: 7,
>     center: newgoogle.maps.LatLng(51.1,0.0),
>     mapTypeId:google.maps.MapTypeId.ROADMAP});
>
> document.body.appendChild(div);
>
> while this one works:
>
> var div = document.createElement("div") ;
> document.body.appendChild(div);
> varmap= newgoogle.maps.Map(div, {
>     zoom: 7,
>     center: newgoogle.maps.LatLng(51.1,0.0),
>     mapTypeId:google.maps.MapTypeId.ROADMAP
>
> });
>
> 2. You have CSS styles applied to themapDIV or its children that
> cause themapto malfunction.
> One such CSS setting was discovered on another post to this group.
> The loaded CSS file had:
>
> div: { overflow: hidden; }
>
> Hope this helps.
>
> Marc
>
> On Oct 10, 9:07 pm, Valy <[email protected]> wrote:
>
> > Hello. I am relatively new toGoogleMaps, but being in need of using
> > it, I can say now that I like working with it very much. My problem is
> > that I am loading amapin a <div> that I am destroying at a certain
> > moment and reload it...to have a FK functionality. Upon reloading, the
> >mapisblank, gray, with the scaleContron set to small, the
> > mapTypeControl to drop-down. I have a search functionality
> > implemented, and if I use it, it works, giving me the coordinates of
> > the place searched, but I can't figure whats wrong with themap. If
> > someone has any idea how to solve this, I would be mostly appreciative.

--

You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=.


Reply via email to