Google Groups Home
Help | Sign in
Message from discussion Blog Post: 2 lines of code make the world a more beautiful, informational place!
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike Williams  
View profile
 More options Oct 3 2008, 7:37 am
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Fri, 3 Oct 2008 12:37:01 +0100
Local: Fri, Oct 3 2008 7:37 am
Subject: Re: Blog Post: 2 lines of code make the world a more beautiful, informational place!
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google