Adding this to your initialize function should fix the problem (sorry,
as noted in many places code is difficult to read on these forums):

getElementsByHref = function(_href){
    lastCharacters = function(needle, haystack){
        var nl = needle.length;
        var hl = haystack.length;

        return needle == haystack.slice(
            hl-nl
        );
    };

    var anchors = document.getElementsByTagName('a');

    var selected = new Array();
    for(var i=0; i<anchors.length; i++){
        if(lastCharacters(_href, anchors[i].href)){
            selected.push(anchors[i]);
        }
    }
    return selected;
};

google.maps.event.addDomListener(getElementsByHref('mapa')[0],
'click',
    function(){
        google.maps.event.trigger(map, 'resize');
});

On Dec 19, 4:27 pm, Vicky <[email protected]> wrote:
> Sorry if I didn't put enough info, here's the link:http://tinyurl.com/34sogp3
>
> I've been reading about that resize, but I just don't understand it.
> Say I copy the function, I don't understand when it should be
> triggered, and how the size goes back.
>
> Thanks for your help!
>
> On 18 dic, 06:34, Andrew Leach <[email protected]> wrote:
>
>
>
>
>
>
>
> > On 18 December 2010 03:35, Vicky <[email protected]> wrote:
>
> > > Hi everyone!
>
> > > I'm having a "mysterious" (at least to me) issue with a map not fully
> > > showing. The Google trade mark and zoom controls show ok, but the real
> > > map only shows in one corner. Here's a picture of 
> > > it:http://tinyurl.com/3x9sr5v
>
> > > I've read many entries on this kind of issue, but I just don't
> > > understand how to make the right changes for it to work. Could someone
> > > help me with a fool-proof explanation?
>
> > Can't help with a fool-proof explanation because you provided a
> > picture, not a link to your site.
>
> > In the code which shows the map (which you didn't include in your
> > snippet), you need to tell the API that it should resize the map, as
> > implied in the documentation:
> > "Developers should trigger this event on the map when the div changes
> > size: google.maps.event.trigger(map, 'resize') ."

-- 
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=en.

Reply via email to