toggle only work with button not checkbox

78 views
Skip to first unread message

K Lo

unread,
Dec 7, 2011, 7:51:54 PM12/7/11
to Google Maps JavaScript API v3
I followed the sample on code.google.com for maps javascript api v3 to
implement a custom overlay using exact set of codes except the image
and co-ordinates.

http://code.google.com/intl/en/apis/maps/documentation/javascript/overlays.html#CustomOverlays

But when I change the button to a check box, it doesn't work. Maybe
I'm missing something totally obvious?

I added this:

<input type="checkbox" id="sectorsmapcheckbox" checked="checked"
Onclick="overlay.toggle();" />

in front of the original code:

<input type="button" value="Toggle Visibility"
onclick="overlay.toggle();"></input>

The button works but the checkbox doesn't. Anybody please help?

JKurtock

unread,
Dec 8, 2011, 9:08:41 PM12/8/11
to Google Maps JavaScript API v3
Let's see. Your problem is html/javascript; nothing to do with maps.
Would someone on this forum help you?

You obviously mis-typed something in your implementation. COULD
someone on this forum help you if they were willing to take the time?
They can't see what you mis-typed.

I'll bet if you had followed the posting guidelines (which require you
to post a link to your map that shows the problem you are having),
someone might actually have helped you out.

Good luck!

- Jeff

On Dec 7, 4:51 pm, K Lo <klo...@gmail.com> wrote:
> I followed the sample on code.google.com for maps javascript api v3 to
> implement a custom overlay using exact set of codes except the image
> and co-ordinates.
>

> http://code.google.com/intl/en/apis/maps/documentation/javascript/ove...

Johnny K Lo

unread,
Dec 14, 2011, 11:37:03 AM12/14/11
to google-map...@googlegroups.com
Thank you Jeff.  It was my first post.  I apologize for not familiarizing myself with the guideline before I post.  It was a distress call...

I got it figured out and it works now.  But thank you anyway for taking the time to answer.  Appreciate it.

Johnny


--
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-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Reply all
Reply to author
Forward
0 new messages