sailing309 / kml-samples

Automatically exported from code.google.com/p/kml-samples
0 stars 0 forks source link

Provide functionality in the earth API to modify the opacity of a balloon. #342

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I think this could be a general Google Earth issue but in my case I'm
working with the browser plug-in (version 5.1)

I've seen other issues regarding opacity posted here but usually around kml
lines geometry and not the balloon feature.  Another balloon opacity issue
dealt with the kml background colour definition (alpha value) and Google
Earths' lack of observance of it.

In my JavaScript code, I'm preventing the default action (balloon defined
in the kml for the feature opening) when a polygon is clicked on.  I create
a html string balloon and set its' content with my prepared html code
(consists of text area, option drop-downs, etc.) so the user can input
metadata for the selected polygon.

So, as the balloon size often covers the selected polygon entirely, I'd
like to allow the user to click on a button/link/rotate mouse wheel/etc. to
toggle or lower the balloon opacity between the current background level
and a lower opacity so they can see what is being covered up for a moment.

Some possible options would be to provide the same kind of setOpacity
JavaScript method that geometry features currently have, or a show/hide
toggling method.  Perhaps a mouse wheel motion (with a key combination like
Ctrl) in the way you can increase/decrease a browsers font size.  (You knew
you could do that, right? :)

There's no current workaround for programmatically modifying the balloon
opacity.

Thanks!

Original issue reported on code.google.com by mcolyn...@gmail.com on 14 Apr 2010 at 6:39