PDA

View Full Version : Passing XML info to GE from Java


msburton
11-10-2005, 11:20 PM
I'm trying to create a tool that uses a joystick to control GE. My plan is to feed the joystick data into a java program via serial and pass this data as XML information to GE. Is is possible to tell GE to take commands from a Java app? Or should I try something other than Java?

Any ideas would be very helpful.

thanks,
Matt

arbitrary
11-14-2005, 12:45 PM
You can pass xml data to GE by way of opening kml/kmz files or using a network link, but you can't "control" GE that way, so it's probably not what you want. There's another thread in this forum about controlling GE, Using COM interfaces to drive Google Earth (http://www.googleearthhacks.com/forums/showthread.php?t=8). I didn't try it so I can't say how well it works. You can't use COM directly from Java, but there are libraries for that, for example JACOB (http://danadler.com/jacob/). Java isn't really the best language for this kind of "low level" programming, but it should be possible.