>                 if (document.getElementById('Legenda') != null)

I don't think you have any <div id='Legenda'> in your webpage.

You do already have a javascript reference to the div as 'legenda',
from when you created it.


>         map.controls[google.maps.ControlPosition.TOP_RIGHT].pop(legenda);

That's all about positioning, not destroying or hiding your legend.

Have you considered something a bit simpler, based around just hiding
and showing the div?
    legenda.style.visibility="hidden";

-- 
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