Transparency?

20 views
Skip to first unread message

Jay_D

unread,
May 30, 2008, 4:21:05 PM5/30/08
to KML Developer Support - Google Earth Browser Plugin
Wow! This looks like it will be quite useful. I just made a quick
little test, and added a complex (3mb) kmz file as a network link.
After getting that working I added LiveWeb to Powerpoint, and dropped
the webpage into Powerpoint as an interactive slide. Which works
great. It seems to take a bit more time to load, but it is still very
usable.

Now for questions. That KMZ file has several layers, can I adjust the
transparency of those layers, such as in google earth?

Side note for other users Network Links do not work will local files
"file:///" so you need to run a little lamp server to get things to
run locally with network links.

Can anyone think of a way to secure kmz/kml files from being
downloaded whilst using the api??

Jay

barryhunter [KML Guru]

unread,
May 30, 2008, 5:36:47 PM5/30/08
to KML Developer Support - Google Earth Browser Plugin


On May 30, 9:21 pm, Jay_D wrote:
> Wow! This looks like it will be quite useful. I just made a quick
> little test, and added a complex (3mb) kmz file as a network link.
> After getting that working I added LiveWeb to Powerpoint, and dropped
> the webpage into Powerpoint as an interactive slide. Which works
> great. It seems to take a bit more time to load, but it is still very
> usable.
>
> Now for questions. That KMZ file has several layers, can I adjust the
> transparency of those layers, such as in google earth?

The API includes functions to iterate through layers, but as as been
unable to get this to get thought NetworkLinks (ie can get to the Link
itself, but not its contents)

If you can get the KMLObject that presents the layer then you can
manipulate it to change the transaprency.

>
> Side note for other users Network Links do not work will local files
> "file:///" so you need to run a little lamp server to get things to
> run locally with network links.
>
> Can anyone think of a way to secure kmz/kml files from being
> downloaded whilst using the api??

You can make it hard, but you can never totally secure it. The best
bet is probably to encode your javascipt and use some sort of
encryption to transfer the url of the remote file. Of course they will
still be able to get round it with bookmarklets, things like Firebug
or network sniffing.


>
> Jay

Paul Rademacher

unread,
Jun 1, 2008, 3:35:12 AM6/1/08
to KML Developer Support - Google Earth Browser Plugin
To get access to the remote KMZ's innards, you could try retrieving it
using
google.earth.fetchKml(plugin, url, callback)

Instead of using a network link. Of course, then you won't get the
networklink's <update> functionality and such.

Jay_D

unread,
Jun 2, 2008, 1:16:35 PM6/2/08
to KML Developer Support - Google Earth Browser Plugin
Thank you Barry and Paul,

Would it be possible to see some working examples of the usage of the
fetchKml and iterating through layers? I'm sure it would be helpful to
many who are joining this new group.

Thanks!

Jay

haveahrt

unread,
Jun 13, 2008, 5:34:16 PM6/13/08
to KML Developer Support - Google Earth Browser Plugin
Jay, can you explain the Network Link and local files part to me?
I'm trying to connect to a kmz file that is on an intranet, not
internet, and it's not working locally for me.
Here is my code:

var networkLink = ge.createNetworkLink("");
networkLink.setDescription("NetworkLink open to fetched content");
networkLink.setName("Open NetworkLink");
networkLink.setFlyToView(true);
var link = ge.createLink("");
link.setHref("http://zephyrus.forestry.oregonstate.edu/ArcGIS/kml/
hja_kml5.kmz");
networkLink.setLink(link);
ge.getFeatures().appendChild(networkLink); }

Thanks
haveahrt
Reply all
Reply to author
Forward
0 new messages