Search code examples
windowsgoogle-earth-plugin

Google Earth plugin - Add multi-touch gestures


I need to add some multi-touch gestures to google earth plugin, and I want your opinion on witch way I can do that. I work with a Dell XPS 18, running on Windows 8.1.

I found a way, using the RawInput API (here), but it's a very low level solution, so do you have another idea?

Thanks!


Solution

  • This is not an easy problem. The good/bad news is that you have found the correct API to use. The problem is that you can't simply "add multi-touch" to the plugin. The plugin runs in a web browser. The web browser doesn't have a concept of pinch-zoom or pan-tilt.

    What you have to do is embed the plugin in your own custom program, and then intercept the raw inputs in that program. From there you will have to all the translations, and manipulate the GE camera appropriately (or, in some cases, just pass the events directly to the plugin.)

    Again, this problem is not easy to solve.

    A reasonable starting point (using WinForms / C#) is:

    https://code.google.com/p/winforms-geplugin-control-library/

    I would suggest trying to rewrite this library using WPF (maybe this already exists?) .NET 4.5 has gesture support built into WPF. (.NET 4.0 might have some stuff as well, not sure.)