From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Embed Google Earth in Your Application Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW
  • Other

Code and Documents

Attachment

Overview

This example shows how to use Google Earth application on LabVIEW as embedded.

 

Description

The example code I present here shows how to take the Google Earth window handle and embed it in your front panel and I have also created some User32 DLL calls that will resize the google earth viewport window to make it fit perfectly in the pane on the front panel.

 

Requirements

Software:

  • LabVIEW 2012 (or compatible)
  • Google Earth Desktop Application.

 

Steps to Implement or Execute Code

1.Install any version of Google Earth application on PC
2.Run the VI.
3.Check and configure parameters at Debug Data page on tab control.

 

Additional Information or Resources

 

2012.PNG

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
User002
Not applicable
on

You mention that you attached 2 zip files, the usual attachment screen isn't showing, any chance you can fix, many thanks in advance.

Mark_SAI
Active Participant
Active Participant
on

They are back on again. Thanks.

KM3
Member
Member
on

Nice job!

Its really helpful.

can u plz guide me how to draw paths on map? should i use load kml data option? or is there any other way?

ADLADL
Member
Member
on

I have tried all the LabVIEW code on NI's web site for google earth integration, and I get the following error.

Error 1045 occurred at Unknown System Error in Google Earth.vi

Possible Reason():

LabVIEW Null Refnum passed to Close Reference.

I have tried different versions of Google Earth 4.3, 5.3 and the latest 6.2, always the same error.

Do you need to register any DLL's or anything.

I am using LabVIEW 2011 64 bit.

Andy suggestions would be greatfully received.

ADL

PA_UW
Member
Member
on

Has anyone figured out a way to plot a path on the embedded GE map not just a point?  In one of the previous comments it says should I use load kml data option - where is that??

Thanks.

PA_UW
Member
Member
on

Did you ever figure out how to plot a path on the map?  Thanks!

Luong.Tran
Member
Member
on

Dear Alll

Would you please do let me know how to plot path on the google earth?

Thanks

Luong.Tran

martian101
Member
Member
on

For people asking about paths, perhaps the easiest solution is to use a KML file. Some useful resources for this are here and here. Generating these KML files is fairly simple. As for importing KMLs, there is an Invoke Method for the GE ActiveX object that allows you to load KML files.

orhan_ozmen
Member
Member
on

I tried the example above, but i couldn't obtain an earth image on my vi. Although I set up the last version of Google Earth, Google Earth İnitialize.vi returns the error code 5000. I couldn't find anything about initializing error. Can anyone help about that error?

 

Thanks. 

waleed160
Member
Member
on

Error 1045 occurred at Unknown System Error in Google Earth.vi

Possible Reason():

LabVIEW Null Refnum passed to Close Reference.

I am using latest version of google earth pro.

vi's work just fine with google earth version 5 but with latest version of google earth pro above mentioned error occurred

I am using LabVIEW 2017 32 bit.

Andy suggestions would be gratefully received.