Wasn't it The Old Man who wrote:
>
>I've just realised in getting this to work, that to add both Wikipedia
>and Panoramio layers to your map, you have to add 4 buttons to your
>map which is a bit OTT! Takes up a lot of room and looks ugly.
>I wish it were possible to have a drop down tick box to enable.disable
>these tiles like on the actual Google Maps website, much neater.
I've thrown together a layer control checkbox. It's not quite as fancy
as the one on maps.google.com.
http://econym.org.uk/gmap/example_layercontrol.htm
I've not written a tut for it yet.
The bit that maps.google.com does, but I can't work out how to do is the
mouseout handling.
I've made my control rectangular, rather than the "tabbed" shape used by
maps.google.com so I don't have to worry about doing mouseovers and
mouseouts of non-rectangular objects, but I still can't get the mouseout
to do what I want.
I get a container mouseout event when the mouse goes over a checkbox, so
if I close the thing on container mouseout, the checkbox goes away just
as you try to click it. What I ended up doing was setting a timeout so
that the control goes away 5 seconds after you open it, which isn't
quite as pretty, but it does the job.
A side effect of having a rectangular container is that things get a bit
ugly if you use longer text for your checkbox labels. You'd need to make
the MoreControl and LayerControl wide enough for your longer text to
make it look nice again.
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---