Toggle multiple kml files

550 views
Skip to first unread message

ronim

unread,
Mar 24, 2011, 7:30:29 PM3/24/11
to Google Maps JavaScript API v3
Hi ladies and gents,
I'm experimenting with maps and found myself at dead end.
What I'm trying to accomplish should be simple toggling of specific
kml file.

Here is what I've tried (please don't laugh please, I know nothing
apart what I have read last few hours :-)):
http://apartments-bol-croatia.com/test1.html
http://apartments-bol-croatia.com/test.html

What I would like (and can't find) is simple example of toggling
multiple kml files via button, or preferably turning kml files on and
off via checkbox. All examples I found are far too complex for my
level.

Ideal for me:
You write up example of how to load 2 different kml files, and two
checkboxes that toggle them on and off.

Hope this is not too much to ask :-)
Thank You!

ronim

unread,
Mar 24, 2011, 8:13:59 PM3/24/11
to Google Maps JavaScript API v3
Hi found something similar to show you what I want to do.
Something like this example: http://outcom.simplehelix.com/don-aero/global-presence

But using kml files, not 300 lines of code :-(

Thanks for your help!

Joseph Elfelt

unread,
Mar 24, 2011, 11:03:07 PM3/24/11
to Google Maps JavaScript API v3
Not exactly what you asked for, but this might be helpful:

http://www.mappingsupport.com/forum_post/preserveViewport_kml_35.html

ronim

unread,
Mar 25, 2011, 6:09:19 AM3/25/11
to Google Maps JavaScript API v3
Not really what I need, saw that example.
Thanks anyway.

geoco...@gmail.com

unread,
Mar 25, 2011, 8:55:54 AM3/25/11
to Google Maps JavaScript API v3
On Mar 25, 3:09 am, ronim <ronima...@gmail.com> wrote:
> Not really what I need, saw that example.
> Thanks anyway.

How about this:
http://www.geocodezip.com/geoxml3_test/myworldone_net_nira3.html

Slightly modified from something that had the functionality, from this
search:
http://groups.google.com/group/google-maps-js-api-v3/search?group=google-maps-js-api-v3&q=kml+checkbox&qt_g=Search+this+group


-- Larry

ronim

unread,
Mar 25, 2011, 9:17:22 AM3/25/11
to Google Maps JavaScript API v3
Here is what I have come up to until now: http://apartments-bol-croatia.com/test1.html

I can load layers via button, but I can not toggle them or remove
them. Any hints? What is wrong?

Thanks.

On Mar 25, 12:30 am, ronim <ronima...@gmail.com> wrote:
> Hi ladies and gents,
> I'm experimenting with maps and found myself at dead end.
> What I'm trying to accomplish should be simple toggling of specific
> kml file.
>
> Here is what I've tried (please don't laugh please, I know nothing
> apart what I have read last few hours :-)):http://apartments-bol-croatia.com/test1.htmlhttp://apartments-bol-croatia.com/test.html

geoco...@gmail.com

unread,
Mar 25, 2011, 10:13:09 AM3/25/11
to Google Maps JavaScript API v3
On Mar 25, 6:17 am, ronim <ronima...@gmail.com> wrote:
> Here is what I have come up to until now:http://apartments-bol-croatia.com/test1.html
>
> I can load layers via button, but I can not toggle them or remove
> them. Any hints?

Fix your javascript errors.

> What is wrong?

You have javascript errors.

-- Larry

>
> Thanks.
>
> On Mar 25, 12:30 am, ronim <ronima...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi ladies and gents,
> > I'm experimenting with maps and found myself at dead end.
> > What I'm trying to accomplish should be simple toggling of specific
> > kml file.
>
> > Here is what I've tried (please don't laugh please, I know nothing
> > apart what I have read last few hours :-)):http://apartments-bol-croatia.com/test1.htmlhttp://apartments-bol-cro...

ronim

unread,
Mar 25, 2011, 10:45:00 AM3/25/11
to Google Maps JavaScript API v3
Ok. Here is the new seemingly working attempt: http://apartments-bol-croatia.com/test3.html

Seems to be working now :-))) Not bad after two days of trying, with
no big knowledge of programming ;-)
Posting it, so it may help someone like me.
Thank you for your help.

R
Reply all
Reply to author
Forward
0 new messages