GE Plugin in WPF Problems

367 views
Skip to first unread message

campbke

unread,
Mar 10, 2010, 4:36:52 PM3/10/10
to KML Developer Support - Google Earth Plug-in
I'm wanting to have the GE plugin inside my WPF app. The way I've
gone about doing it is inside the WPF app I have a Frame whose source
is an HTML page which has the GE plugin. (Hope that makes sense).
Anyway, if I browse to the html file on my file system and open it
up,
the GE plugin works fine, but as soon as I try to run it from within
my WPF app, the page comes up and it says the the GE plugin is not
installed. Any ideas?

fraser (Earth API Guru)

unread,
Mar 11, 2010, 5:01:37 AM3/11/10
to KML Developer Support - Google Earth Plug-in
Hi,

AFAIK WPF can't interact with the HTML inside of a frame. This means
that the plugin can't be initalised properly (hense the issue). You
would have to use WPF's WebBrowser control (although this in itself
has other issues...)

F.

campbke

unread,
Mar 11, 2010, 9:48:08 AM3/11/10
to KML Developer Support - Google Earth Plug-in
thanks for the reply. could you possibly elaborate on the "other
issues" with using a WebBrowser control?

fraser (Earth API Guru)

unread,
Mar 11, 2010, 11:50:31 AM3/11/10
to KML Developer Support - Google Earth Plug-in
Hi,

Sure, the main issue is that you have to make the class that deals
with the javascript/managed interation COM visible.
I have a small (old) example that uses the WebBrowser control
(winforms) here that covers the main pit-falls.
http://fraserchapman.blogspot.com/2008/08/google-earth-plug-in-and-c.html

Other that that check this blog on intergatring virtual earth in WPF
as it is basically the same process.
http://blogs.msdn.com/dditweb/archive/2007/08/22/using-virtual-earth-in-your-wpf-application.aspx

hope that helps.

F.

> > > installed.  Any ideas?- Hide quoted text -
>
> - Show quoted text -

dp

unread,
Mar 17, 2010, 11:20:09 AM3/17/10
to KML Developer Support - Google Earth Plug-in
The problem may be that you're running the plugin on a 64-bit OS with
the .NET platform target set to AnyCpu. If this is the case, Set the
PlatformTarget to x86 and it should work.

On Mar 11, 12:50 pm, fraser (Earth API Guru) wrote:
> Hi,
>

> Sure, the main issue is that you have to make the class that deals
> with the javascript/managed interation COM visible.
> I have a small (old) example that uses the WebBrowser control

> (winforms) here that covers the main pit-falls.http://fraserchapman.blogspot.com/2008/08/google-earth-plug-in-and-c....


>
> Other that that check this blog on intergatring virtual earth in WPF

> as it is basically the same process.http://blogs.msdn.com/dditweb/archive/2007/08/22/using-virtual-earth-...

Reply all
Reply to author
Forward
0 new messages