Sencillo programa que nos permite insertar y utilizar de forma totalmente operativa Google Earth, en una aplicación de windows forms. Es muy mejorable.
Para mas información ver el enlace: https://code.google.com/p/earth-api-samples/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using GEPlugin;
using System.Runtime.InteropServices;
using System.Security.Permissions;
namespace WindowsFormsApplication1
{
[ComVisibleAttribute(true)]
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public partial class Form1 : Form
{
private const string PLUGIN_URL =
@"http://earth-api-samples.googlecode.com/svn/trunk/demos/desktop-embedded/pluginhost.html";
private IGEPlugin m_ge = null;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate(PLUGIN_URL);
webBrowser1.ObjectForScripting = this;
}
public void JSInitSuccessCallback_(object pluginInstance)
{
m_ge = (IGEPlugin)pluginInstance;
}
}
}