Kazu46Machi / earth-api-samples

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

Client-side adjustable transparency for SuperOverlays #133

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What should this feature enhancement do?

Enable transparency of Overlays using NetworkLinks (SuperOverlays) to be
changed from the browser.

It seems to me that if Overlay transparency were set with a <styleUrl>
rather than a <color>, then SuperOverlay tile transparency could be
adjusted en masse on the client side rather than the server side. 

Are there any known workarounds that produce the similar results?

Only reloading the data using a different <color> attribute can produce a
similar result.

Original issue reported on code.google.com by the.muta...@gmail.com on 29 Dec 2008 at 4:29

GoogleCodeExporter commented 8 years ago
A more generic feature request would be to expose the Network Link DOM... that 
is,
the ability to do:

networkLink.getFeatures().getFirstChild()

and such. Does this satisfy the requirement?

Original comment by api.roman.public@gmail.com on 6 Jan 2009 at 7:48

GoogleCodeExporter commented 8 years ago
Exposing the DOM for network links would be extremely useful too, but it 
wouldn't be
an ideal solution for this particular feature. You would still have to walk 
through
the DOM and call overlay.getColor().setA(n) on every individual GroundOverlay. 
That
could be slow for a very detailed superoverlay.

the.mutatron's approach would be perfect for this. For example, your root KML 
could
contain:

  <Style id="MySuperStyle">
    <IconStyle>
      <color>FFFFFFFF</color>
    </IconStyle>
  </Style>

and your superoverlay KMLs would contain:

  <GroundOverlay>
    <StyleUrl>http://my.example.com/my.kml#MySuperStyle</StyleUrl>
    ...
  </GroundOverlay>

Then you could get a reference to that <Style id="MySuperStyle"> element and 
simply
call style.getIconStyle().getColor().setA(n) and it would change the opacity of 
all
the ground overlays at once.

Original comment by mike%gea...@gtempaccount.com on 5 Jun 2009 at 7:07

GoogleCodeExporter commented 8 years ago
Agreed; setOpacity would be a more useful feature.

Original comment by api.roman.public@gmail.com on 5 Jun 2009 at 8:45

GoogleCodeExporter commented 8 years ago
A closely related point: What we're really looking for is for this opacity 
setting to
be fast enough that we can animate it to do a fade effect. You can easily do 
that
with a ground overlay - you can get a smooth fade with a fast frame rate. My 
hope is
that making this single API call would set the opacity of all the ground 
overlays in
the superoverlay, fast enough that we can run it on an interval timer and fade 
the
entire superoverlay in or out, or even do a crossfade between two superoverlays.

Original comment by mike%gea...@gtempaccount.com on 8 Jun 2009 at 8:19

GoogleCodeExporter commented 8 years ago
Just ran into the situation where I'd need this feature. +1

Original comment by simo...@gmail.com on 29 Jul 2009 at 7:50

GoogleCodeExporter commented 8 years ago
Available as an experimental feature in GE Plugin 5.0.3506.3999 (API 1.003) as
KmlFeature.getOpacity and KmlFeature.setOpacity. More details here:

http://groups.google.com/group/google-earth-api-notify/browse_thread/thread/6a32
fdfcc60236e

Original comment by api.roman.public@gmail.com on 9 Sep 2009 at 10:19