Closed GoogleCodeExporter closed 9 years ago
I have used the follwing code to access the balloon clicked on the plugin in
plugin.html file.
google.earth.addEventListener(feature, action, events_.generic[hash],
useCapture,initCB); google.earth.addEventListener(ge, 'balloonopening',
function(event) {event.preventDefault();var placemark =
event.getBalloon().getFeature();var placemark_desc =
placemark.getDescription();var placemark_name = placemark.getName();var
placemark_desc_active =
placemark.getBalloonHtmlUnsafe();addData(placemark_desc_active );})
Further in the function addData i have done the follwing to add this text to
the textBox i have created:
function addData(text){ var TheTextBox = document.getElementById("Mytextbox");
TheTextBox.value = TheTextBox.value + text; }
But i dont see any text in the box when i click the balloon.
Original comment by nitinkum...@gmail.com
on 24 Sep 2012 at 6:46
It would be simply a case of adding a listener and then extracting the relevant
information.
Take a look at the following example:
http://code.google.com/p/winforms-geplugin-control-library/wiki/AddEventListener
Where the line: MessageBox.Show(e.ApiObject.getTarget().getType()); // GEGlobe
is you should be able to call.
e.ApiObject.getTarget().getBalloonHtmlUnsafe()
and then use that information however you want.
Original comment by fraser.c...@gmail.com
on 18 Nov 2012 at 7:16
Original issue reported on code.google.com by
nitinkum...@gmail.com
on 17 Sep 2012 at 8:27