atom feed4 messages in com.googlegroups.kml-support-getting-startedRe: rich content in info boxes of EMB...
FromSent OnAttachments
JackanNov 7, 2008 7:41 am 
Roman NNov 11, 2008 11:30 am 
JackanNov 18, 2008 3:46 am 
Roman NNov 19, 2008 3:26 pm 
Subject:Re: rich content in info boxes of EMBEDDED Google Earth?
From:Roman N ()
Date:Nov 19, 2008 3:26:16 pm

Hi Jack,

The added balloon security model imposed by the plugin prevents this from being a very simple task. I am, however, working with our engineers on ways we can improve the security model.

You should still be able to accomplish this using JavaScript balloons, if you use fetchKml. This would be the general idea:

1) Use fetchKml to load the KML file containing all of your placemarks, which subsequently contain Flash <embed> tags 2) Before displaying the loaded KML file in the Earth instance, traverse through the loaded KML DOM (document object model) and attach event listeners to all placemarks that you find, as per the sample I linked to above 3) In the event listener, create an HTML string balloon using JavaScript calls (again, as in the sample above), and use the placemark's getDescription() method to set the balloon's HTML content, which can contain <embed> tags

This process should allow you to overcome the plugin's balloon- scrubbing security mechanism. The trickiest part is traversing through the KML DOM. For this, a developer on the forum has provided a relevant sample:

Hope that helps!

- Roman

On Nov 18, 3:46 am, Jackan wrote:

Hi Roman,

Thanks for the reply and example. So does that mean that it is not possible to simply import KML's using network links and to get them to display in the browser the same as in the desktop GE application wtihout scripting each info bubble in the HTML?

This is a bit of a problem for me as I want to create a system where mere mortals can create KML's on GE desktop (which include .swf's), upload them to a server and then them to be displayed on the embedded GE application. Any ideas? The project I am working for is a not for profit and for a conservation organisation to raise money for and awareness of environmental issues. So if anyone is interested in getting involved let me know!

On Nov 11, 7:30 pm, Roman N wrote:

Hi Jack,

The Google Earth Browser Plugin scrubs out several elements out of KML balloon content for security purposes, Flash embeds included. You may need to use fetchKml and then manually create the JavaScript balloons on placemark click. See the following sample on creating Flash balloons:

- Roman

On Nov 7, 7:41 am, Jackan wrote:

Hi everyone!

Got a quick question here which I sort of need to know before starting a big project.

I am creating KML files in desktop Google Earth with info bubbles containing rich content i.e. flash files and images. So far so good.......!

I am now creating an embedded GE application that users Network links to import the KML files into the GE in my site which works a treat! Almost there..........!

However when i open the info bubble attached to the placemarks within the imported KML they only contain text and not my rich content as in the desktop GE! All the links to the .swfs and image files are obviously absolute and all the files are uploaded to my server. However maybe I have to write some special API to allow the embedded GE application to display the info bubbles in the same manner as the desktop GE?

I suppose an easy way to ask the same question is – “can you display info bubbles with rich content in embedded GE like you can in desktop GE? “

Thanks in advance, Jack- Hide quoted text -