Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8308925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:57:07+00:00 2026-06-08T18:57:07+00:00

I have a server that is serving up an xhtml page with all of

  • 0

I have a server that is serving up an xhtml page with all of the content I want displayed in my google earth (or worldwind) balloon. I would like the placemark balloon to fetch the html page when it is clicked on the map. To make it simple, I want my balloon to be http://www.yahoo.com when you click it from the map.

Any searching online sends me to java code that can hook into the google earth api. I am really hoping there is a client side kml way to do this. Is there an extended data tag or description tag I can use to get this to work? I have even tried to use the embed tag which works great for a you tube video but there is no plugin for an html page. Any help is much appreciated.

This works too but an iframe is pretty ugly –

<Placemark> 
  <name>Test Placemark</name> 
    <description> 
      <![CDATA[ 
        <iframe src="http://www.yahoo.com" frameborder="0" 
           scrolling="auto" height="500" width="600"></iframe> 
      ]]> 
    </description> 
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:57:10+00:00Added an answer on June 8, 2026 at 6:57 pm

    you could try the getBalloonHtmlUnsafe() and the HtmlDivBalloon? https://developers.google.com/earth/documentation/balloons#getballoonhtmlunsafe

    However you are adding the kml to the page you could then bind a click function to those placemarks.

    google.earth.fetchKml(ge, url, function(kmlObject){
       if(kmlObject){
          ge.getFeatures().appendChild(kmlObject);
    
          if(kmlObject.getType() === 'KmlPlacemark'){
              google.earth.addEventListener(kmlObject, 'click', function(event){
                   event.preventDefault();
    
                   var balloon = ge.createHtmlDivBalloon('');
                   var content = kmlObject.getBalloonHtmlUnsafe();
                   balloon.setFeature(kmlObject);
                   var div = document.createElement('div');
                   div.innerHTML = content;
                   balloon.setContentDiv(div);
    
                   ge.setBalloon(balloon);
              });
          }
       }
    });
    

    If that still doesn’t work, remember that google earth scrubs a lot of balloon data so you might try using jquery to inject the html.

    var balloon = ge.createHtmlDivBalloon('');
    var content = kmlObject.getBalloonHtmlUnsafe();
    balloon.setFeature(kmlObject);
    var div = document.createElement('div');
    balloon.setContentDiv(div);
    
    ge.setBalloon(balloon);
    $(div).html(content);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a server that is serving files to several windows clients using the
I have a server that runs different websites on different ports. All of them
We have a web server running IIS 6.0 and ASP.NET MVC, that is serving
I have a Tapestry application that is serving its page as UTF-8. That is,
We have a server that is serving one html file. Right now the server
I have an ASP.NET (MVC) website that is serving static content (images) as well
I have a simple Express server that is serving up some static files. Here
I have a server that is trying to stream some content to a client
The title say's almost all. What I have is short lived server processes that
I have a page in ASP.net (VB) that I'm serving via IIS. The page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.