It seems the preferred way to use Google Earth in an application is to embed it within a web page then access it via the javascript API.
However, rather than embed it in a web page, is it possible for some code to embed new functionality within the Google Earth desktop application itself? or is writing my own app with an embedded web browser my only option?
Google dropped support for the COM API (ie. the desktop app) some time ago. The COM API was pretty terrible even on the best of days anyway.
What you could do is write an app that uses an embedded web browser -- and that web browser is what is viewing your Google Earth instance. Then you get the full features of the web API, plus the robust features of your language. If you use C#, you can use Google's API (which has a C# binding) and connect that to the javascript events as needed (ie. to figure out when the user clicked stuff in the web page.)
Here's an excellent point where you can get started:
http://code.google.com/p/winforms-geplugin-control-library/
In all seriousness -- having worked with the old COM API for nearly 2 years -- I'm glad it's gone. You really don't want to use it.
is it possible for some code to embed new functionality within the Google Earth desktop application itself
Depends exactly what you want to do. Can do a fair bit (but not everything!) with KML and in particular NetworkLinks.
is writing my own app with an embedded web browser my only option?
Not the only, but probably the most flexible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With