UP:

now the legend works: you must set the two parameters to show/hide the
custom control:

  object.style.visibility=hidden/visible;
  object.style.display=none/block/etc;

if you specify only one parameter, you will have some problems.

now I have another question.

i wanna make my legend like the "drop_down_menu" of
"google.maps.MapTypeControlStyle.DROPDOWN_MENU"

how can i made this?
sorry for my english, i think i made some mistakes!

On 2 Ago, 10:56, inotipiedideipitoni <inotipiedideipit...@gmail.com>
wrote:
> Hi, i've modified the script, and pressing the button the legend
> appear/disappear, but everytime i reload a page (or zooming
> something), the legend appear automatically and I don't know why...
>
> the link is up.
>
> thanks in advance!
>
> On 30 Lug, 22:12, Rossko <ros...@culzean.clara.co.uk> wrote:
>
> > >                 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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to